Use rules to customize your mail merge based on information in your data source. For example, you can use a rule to add Past due when a recipient's Due Date is in the past.
Set up rules after you select the recipients for the mail merge and insert the merge fields in your document.
Go to Mailings > Rules and choose a rule based on the descriptions below.
Ask
Use the Ask rule when you want to enter information once and show it in multiple places in the merged document. For example, if a meeting date isn't in your data source, you can enter the date once and show it wherever you've added the corresponding bookmark.
- In the merge document, press Ctrl+F9 and then type a name to create a bookmark. Repeat this, using the same name, in every place where you want the response to the Ask field to appear in the document.
- Place your cursor somewhere in the document, before the first bookmark you just created.
- Go to Mailings > Rules > Ask.
- Select the bookmark you just created (or type its name), and enter a prompt, like "Event date?" in the Prompt box.
- Select OK, and then OK again.
- At the end of the process, when you select Finish & Merge, choose Edit Individual Documents. You'll be prompted for a response for each recipient. That response will be inserted in the bookmarks you specified, in the documents that result from the merge.
More info: Field codes: Ask field
Fill-in
For example, you're sending the same invitation for a quarterly meeting. Your data source doesn't store the meeting dates, and the meeting date appears only once in the invitation.
By placing a Fill-in field in the document, you can run the same merge for each meeting. The only thing you'll have to type is the meeting date.
Place your cursor where you want the fill-in text to go.
In the Mailings tab, go to Rules > Fill-in.
Enter a prompt, like Event date? in the Prompt box.
Select OK, and then OK again.
Select Finish & Merge > Edit Individual Documents.
When prompted, enter a response for each recipient. That response will be inserted in the Fill-in field and appear at the bookmarks in the merged document.
If...Then...Else
Use an If...Then...Else rule to show different text based on information in your data source. For example, you can show one arrival message when the Country/Region field is blank and another when it isn't.
Place your cursor where you want the conditional text.
Go to Mailings > Rules > If...Then...Else.
Choose the Field name and Comparison.
In the Compare to box, enter the value you want to compare. Skip this step if you selected is blank or is not blank.
In Insert this text, enter the text to show when the condition is met.
In Otherwise insert this text, enter the text to show when the condition isn't met.
Select OK.
More info: Field codes: IF field
Merge Record #
Use Merge Record # to show each recipient their position in a waitlist. For example, you can sort the recipient list in chronological order of signups, and then use a Merge record # rule to display the recipient's numbered position in the list.
The record number reflects any sorting or filtering that you apply before the merge.
Tip
Use a Merge rec # rule next to a Print Date field to create unique invoice numbers.
- Place your cursor where you want the record number to appear.
- Go to Mailings > Rules > Merge Record #.
More info: Field codes: MergeRec field
Merge Sequence #
Use Merge Sequence # to show the number of each record in the merged document. For example, you can number each recipient in the order they're merged.
- Place your cursor where you want the record number to appear.
- Go to Mailings > Rules > Merge Sequence #.
More info: Field codes: MergeSeq field
Next Record
Use the Next Record rule to tell Word to proceed to the next record without starting a new page. For example, you're using mail merge to print your contact list on a single sheet of paper.
Note
A sheet of mailing labels is laid out as a table in Word. To place the next address in the label, Word uses the Next Record rule in each table cell.
- Place your cursor where you want data from the next record to appear.
- Go to Mailings > Rules > Next Record.
- Insert a merge field for the data you want next
A list of company names might look like this:
«Company_Name»
«Next Record»«Company_Name»
«Next Record»«Company_Name»
More info: Field codes: Next field
Next Record If
Use Next Record If to control when Word moves to the next record based on a condition. For example, you can use the Country/Region field to separate domestic and international attendees.
- Place your cursor where you want data from the next record to appear.
- Go to Mailings > Rules > Next Record If.
- In the Field name list choose the merge field name, such as City.
- In the Comparison list choose a way of comparing the data value. For example, to single out recipients in a particular city, choose Equal to.
- In the Compare to box, enter the value that you want to use. For example, to single out recipients in Tokyo, type Tokyo (skip this if you chose is blank or is not blank as the comparison).
More info: Field codes: NextIf field
Set Bookmark
Use Set Bookmark to enter information once and use it in multiple places in your document. For example, you can enter a speaker's name once and use it wherever you've added a corresponding Ref field.
- Place your cursor anywhere in the document.
- Go to Mailings > Rules > Set Bookmark, and type a name, and then select OK.
- Place your cursor wherever you will want the bookmark text to appear.
- Go to Insert > Quick Parts > Field, and choose Ref.
- Choose the bookmark name you just created, and select OK.
- Insert the Ref field everywhere you want the bookmark text to appear.
- Before you run the merge, right-click the Set field, select Edit Field, and enter the text you want in the Text box.
- Select OK.
More info: Field codes: Set field
Skip Record If
Use Skip Record If to exclude recipients from the mail merge based on information in your data source. For example, you can exclude customers whose Size field matches a specific size.
- Go to Mailings > Rules > Skip Record If.
- In the Field name list choose the merge field name, such as Size.
- In the Comparison list choose a way of comparing the data value. For example, to single out customers who wear a specific size, choose Equal to.
- In the Compare to box, enter the value that you want to use. For example, to single out customers who wear size extra-small, choose XS (skip this if you chose is blank or is not blank as the comparison).
More info: Field codes: SkipIf field