Wednesday, March 14, 2018

Merge to More Than One Document

Custom content



In the Data Source, include a field for the type of letter the recipient requires.

In the Main merge document, enter IF fields, such as:

{IF {MERGEFIELD "LetterType"=1} {INCLUDETEXT "C:\\Project\\Letter1" \* MERGEFORMAT} ""}
{IF {MERGEFIELD "LetterType"=2} {INCLUDETEXT "C:\\Project\\Letter2" \* MERGEFORMAT} ""}


  • The curly brackets { } cannot be entered from the key board. Either use Insert>Field, or Ctrl+F9.
  • Word uses spaces in the If..Then..Else statement.
  • The last two quote marks "" are "empty" , so nothing will be entered.
  • Notice the \\ in the path statement. A path is not needed if the Main document is in the same folder as the letters.
  • To see the field codes, use Alt+F9 to toggle the view on and off.
Letters 1 and 2 can have completely different texts, formats and layouts. One can be an invitation to a sale, the other can be a dunning letter. (To carry over different formatting, leave out the \* MERGEFORMAT switch)

After setting up the main document for mail merging, insert all of the fields you want to merge.

Copy the individual fields and paste them in the correct locations in Letter 1 and 2.

Go back to the main document and erase all of the text and fields EXCEPT for the IF statements.

Letters 1 and 2 do not have to be set up a merge docs, or connected to a data source. Their text will be inserted in the Main document depending on the field type.



See all Topics

No comments: