Creating a Word template for nested mail merge
This example shows how to create a template for nested mail merge.
See also Example templates for nested mail merge.
- Create a blank Word document.
- Enter the content that you want to appear in the template.
To add a picture to the template, click Insert | Pictures, browse to the relevant file and click Insert.
To ensure all text and pictures remain formatted correctly during a nested mail merge, use a table to format your document.
- Insert the TableStart and TableEnd merge fields for the parent and nested (child) entities:
- Click Insert | Quick Parts | Field.
- Select MergeField from Field names.
- Enter the merge field name in Field name.
For example: TableStart:Orders, TableEnd:Orders, TableStart:OrderItems, or TableEnd:OrderItems.
You must include the TableStart and TableEnd merge fields in the same template section, table row, or table cell. See also Considerations for creating the template body.
Here's an example of using the TableStart and TableEnd merge fields for Orders and Order Items:
«TableStart:Orders»
Insert Order merge fields here.
Column 1
Column 2
«TableStart:OrderItems»Insert Order Items merge fields here. Insert Order Items merge fields here.«TableEnd:OrderItems» Insert Order merge fields here.
«TableEnd:Orders»
- Insert the merge fields you want to appear in your template between the TableStart and TableEnd merge fields:
- Click Insert | Quick Parts | Field.
- Select MergeField from Field names.
- Enter the Sage CRM merge field name in Field name. To ensure the template works properly, a merge field must correspond to the exact field name in Sage CRM. This is not the name that's listed in the Insert Sage CRM Field drop down on the mail merge screens. You must get the exact field name from your system administrator. Enter merge fields from one entity only.
- Click OK.
- Add a paragraph break after a merge field.
- Include the CID field beside each currency field to ensure the currency information is formatted correctly.
Example: «orIt_quotedprice_CID»«OrIt_quotedprice»
- To add the current date field, include «CurrentDate».
- Ensure the template does not contain column, section, or line breaks.
- Click File | Save As and save the template as .docx, .docm (if it contains a macro), .htm, or .html. You can upload the template and use it to perform a mail merge.
For more information, see Uploading a Word template or image file. To share the template with other users, email it to your system administrator and ask the administrator to upload it to the global Shared Templates list.