First name') . ' ' . $record('last name') – Nisus Writer Pro User Manual

Page 374

Advertising
background image

354

Merging Documents

Working with Multiple Documents

Figure 388

A standard business letter with Merge Placeholders

!

You will notice that not all the Merge Placeholders in the new letter appear in the menu Insert >
Merge Placeholder
. You can create any Merge Placeholder you want.

2. Choose the menu command Insert > Merge Placeholder > Other… to enter custom

placeholders and choose from the three available options.

Choose one of the commands from the Placeholder for Address Book contact property:

pop-up menu (as illustrated at the top of Figure 389):
First Name, Middle Name, Last Name, Name Title, Name Suffix, Birthday, Email, Work
Email
, Home Email, Phone, Home Phone, Work Phone, Mobile Phone, Home FAX, Work
FAX
, Job Title, Department, Organization, Address, Address (city), Address (state),
Address (zip), Address (country), Home Address, Home Address (city), Home Address
(state)
, Home Address (zip), Home Address (country), Work Address, Work Address
(city)
, Work Address (state), Work Address (zip), and Work Address (country).

These are the fields available in Apple's Address Book application.

Click Placeholder for the property with the name: and type the name of the placeholder

you want to use in your document.
In addition you can check either or both:

If not blank, then prepend: and add the text you want to have appear before the text
that replaces the Merge Placeholder.

If not blank, then append: and add the text you want to have appear after the text that
replaces the Merge Placeholder.

Click Placeholder that uses the output from the following Perl code: and add your Perl

code in the text box available in the dialog.
This code is run once for each record in the data document to derive the text used during
merging (which should be printed to STDOUT or “standard output”). All data source
property values are available to this block of Perl code in the special predefined “record”
hash. A trivial example that constructs a full name:

print $record

('First Name') . ' ' . $record('Last Name');

Advertising