When you use the Mail Merge feature of Microsoft Word, you
can use only one main document with one data source. However, with the use of IF and AutoText fields, or IF and IncludeText fields, you can simulate merging one data source into several
letters.
Using AutoText fields stores your information in AutoText entries; using IncludeText fields stores your information in separate letters. Either method
will produce the same results.
This article describes how you can
use the AutoText fields to produce several letters with one data source.
For additional information about how to use the IncludeText method instead,
click the following article number to view the article in the Microsoft
Knowledge Base:
299837
(http://support.microsoft.com/kb/299837/EN-US/
)
How to Merge a Single Data Source to Multiple Letters with IncludeText
To create a mail merge to produce several different letters to
different people based on a particular set criteria, you first must create and
save separate documents as either AutoText entries or as documents that contain
the merge fields you want to use.
In a new document, use AutoText
entries to set up the file as a mail merge main document.
On the Tools menu, click Mail
Merge.
In the Main document section of the
Mail Merge Helper dialog box, click Create,
and then click Form Letters. In the next dialog box that
appears, click Active Window.
In the Data source section, click
Get Data, and then click Open Data Source. In
the Open Data Source dialog box, find your data source, and
then click Open.
The Header Record
Delimiters dialog box appears.
In the Header Record Delimiters dialog
box, select a Field delimiter and a Record
delimiter.
In the message box that appears, click Edit Main
Document.
Create the first letter, and then enter the appropriate
merge fields.
On the Edit menu, click Select
All.
On the Insert menu, point to
AutoText, and then click New. Type a name,
for example, "Letter1," and then click OK.
Modify this letter to reflect the format or style you want
for your second merge document. Enter merge fields as appropriate.
Repeat steps 7 through 9 for each type of letter you need.
When you name the AutoText entry, use a different name, such as "Letter2,"
"Letter3," and so on.
After you create all of the letters as AutoText, you need to
modify your data source to include a field that will be helpful in identifying
which letter you will create for a particular record.
Using the mail merge main document you created in the
"Setting Up the Mail Merge Main Document" section of this article, on the
Edit menu, click Select All, and then press
DELETE to create an empty document.
On the File menu, click Save
As, give it a different file name, and then click
Save.
On the Tools menu, click Mail
Merge. Under Data Source, click
Edit, and then click the name of the data file. The
Data Form dialog box appears.
Click View Source to open the data
file.
To create a new field, click the Manage
Fields button on the Mail Merge toolbar.
In the Field name box, type a field name
(for example, type Code) click Add, and
then click OK.
For each record, enter a code in the Code field to identify which AutoText "letter" entry will be used for
that particular record. For example, if you created three letters as AutoText
entries, for each record in your Data source, enter a 1, 2, or 3 into the Code field. Code 1 represents the first AutoText entry, Letter1; code
2 represents the second AutoText entry, Letter2; code 3 represents the third
AutoText entry, Letter3, and so on.
You need to modify the blank main document to include IF fields that identify which AutoText letter will be merged for
each particular record.
At the top of the blank document, follow these steps to
enter an IF field into the document:
Press CTRL+F9 to insert field braces {} in the
document.
Type the following text so that the end result of the
field resembles this example:
{IF{MERGEFIELD Code}="1" "{autotext "Letter1"}"}
Note Everywhere you see a left field brace ({), you need to insert it
by pressing CTRL+F9.
For each AutoText "letter" entry you have, create the
same type of field. For example, if you create three letters, you have the
following three IF fields:
When you perform the mail merge, Word produces the AutoText
letter designated for the code the data file has for a particular record. For
example, if Record 1 has the value 1 in the Code field, the fields from this record will be displayed in Letter1.
If Record 2 has a code of 3, the merge produces Letter3.
For more
information about mail merge, click Microsoft Word Help on the Help menu, type using mail merge in the Office
Assistant or the Answer Wizard, and then click Search to view the topics
returned.
For additional information about using the IncludeText
method, click the article number below to view the article in the Microsoft
Knowledge Base:
299837
(http://support.microsoft.com/kb/299837/EN-US/
)
How to Merge a Single Data Source to Multiple Letters with IncludeText