Preparing a Document with Merge Fields

You can use two types of merge fields, both of which have the syntax <<Field Name>>. You can use simple merge fields to update a Word document with specific values in a data source. You can use table merge fields to fill out a table in a Word document for each row in a data source. This document describes how you can add merge fields to your document to take advantage of the document merge rule's functionality.

Example: You want to create an invoice template that includes a customer’s billing address, invoice number, and purchase details. You can add merge fields for the billing address and invoice number, and then, with a table, you can define a region called "MyItem" in the second row that is replaced with specific items that the user orders. This looks like:

Adding Simple Merge Fields

  1. Open a Microsoft Word document.
  2. Click where you want to place a merge field.
  3. In the Insert tab, click Quick Parts and then Field….
  4. Under Categories, select (All).
  5. Under Field names, select MergeField.
  6. Type the name of the merge field under Field name.
  7. Click OK.

Note: You cannot manually insert brackets to generate a merge field.

Editing Simple Merge Fields

  1. Right-click the merge field.
  2. Click Edit Field….
  3. Provide updated information in the dialog.
  4. Click OK.

Tip: To insert a field quickly, press Ctrl + F9 and then edit the field.

Adding Table Merge Fields

When you create a field merge table in Word, you need to define the region in a table row in which you are going to replace the data. You can do this using specially named starting and ending merge fields.

  1. Open a Microsoft Word document.
  2. Add a table with two rows. In the first row, include headers for the table. In the second, define the updated region.
  3. In the first column of the second row, add a field merge called “TableStart:MyObject” and replace “MyObject” with the name for the region.
  4. In the last column of the second row, add a field merge called “TableEnd:MyObject” and replace “MyObject” with the name for the region.
  5. After the first field merge and before the last field merge, add simple merge fields for each column header.

Once the merge document is ready, you can preview test values before using the merge document in a Run Rule activity that is configured to use a document merge rule.