Letter template
A letter template is a Microsoft Word document that you want to send to recipients using WorkZone Mass Dispatch. The template includes the mandatory opening and closing merge fields and the body of the letter with merge fields. The merge fields will be populated with values when the template is merged with the contact and case information from the recipient list. The values represent information for each particular contact or case such as name, address, and other data .
Apart from the ServerKey field, you must add all fields defined on the schema sheet to the letter template. The ServerKey field can be skipped. If you no longer need a specific field in a letter template, you can remove it from the schema sheet.
If you want to keep fields in the schema sheets but you do not want to use these fields as merge fields in the letter template, you can use a white font to hide the fields in the letter template.
Create a letter template
The structure of merge fields is the following: in curly braces, MERGEFIELD
and then the alias of the field, for example,{ MERGEFIELD FirstName }
.
- Press Alt + F9 to view merge fields in curly braces.
- Insert opening and closing merge fields for contact and case information in the letter template using Quick Parts in Word.
The opening and closing merge fields are:
- Contact:
{MERGEFIELD TableStart:Recipients }
and{MERGEFIELD TableEnd:Recipients }
. - Case:
{MERGEFIELD TableStart:Cases }
and{MERGEFIELD TableEnd:Cases }
.
In this example, the Excel sheet that contains the contact information is named Recipients and the sheet that contains the case information is named Cases.
On the Insert tab in Word, click Quick Parts > Field, and then select Merge field from the list of field names. Enter the opening merge field, for example {MERGEFIELD TableStart:Recipients }
, in the Field name field. Repeat this step for each of the opening/closing merge fields, you want to insert.
- Type the body text of the letter template and add merge fields as appropriate in the text. The body of the letter must be placed between the starting and closing merge fields.
You can use the Quick Parts to add the merge fields in the same way as you insert the opening and closing merge fields.
- Alternatively, you can connect to a local copy of the recipient list from Word. Go to Mailings > Select Recipients > Use an Existing List and select the Excel file with the recipient list. In the Select table dialog box, select the Contacts table, leave the First row of data contains column headers option selected, and then click OK.
- Type the body of your letter. Use Insert Merge Field of the Mailings tab to add a merge field when you need to include the information from the recipient list.Tip: You can preview your letter by selecting Preview Results in the Mailings tab in Microsoft Word.
-
Repeat steps 4-5 if you want to insert merge fields from for the Cases table in the letter.
- Save your changes.
Tips for formatting date, currency, and number
Use a switch in Microsoft Word to format the results of the merge field. You can change the date, time, currency, and number format in your letter template to whatever you like.
- Select the merge field you want to change.
- Press Alt + F9 to view the field coding in Microsoft Word. The field you have selected should now look like this:
{ MERGEFIELD Date }
. - Add the formatting data to the merge field using the numeric picture switch (
\#
) for currency and number fields or the date-time picture switch (\@
) for date fields. See some examples below. - Right-click the merge field and select Update Field.
Date field code with picture switch and format specifiers | Displayed in the letter |
---|---|
{ MERGEFIELD Date\@ "MMMM d, yyyy" }
|
March 29, 2021 |
{ MERGEFIELD Date\@ "dd/MMM/yy" }
|
29/Mar/21 |
|
29 March 2021 |
See more about date and time format specifiers in the Microsoft documentation.
Numeric field code with picture switch and format specifiers | Displayed in the letter |
---|---|
|
$1220.00 |
|
1220 |
|
$1,220 |
See more about the numeric format specifiers in the Microsoft documentation.