The feature you're looking for is called "mail merge" and is located on the Tools menu. Exactly where it is and what it's called depends on your version of Word. In Word 2003, choose Tools » Letters and Mailings » Mail Merge to open the Mail Merge task pane (Figure 9-3, left); in Word XP, choose Tools » Letters and Mailings » Mail Merge Wizard to open the wizard, which looks the same as the Mail Merge task pane. The task pane or wizard then walks you through the six steps of specifying the document type, choosing the starting document, selecting recipients or creating a new list of recipients, laying out the document, previewing the document, and then completing the merge.
In Word 2000, choose Tools » Mail Merge to display the Mail Merge Helper dialog box (shown in Figure 9-3, right, with most of a merge set up). The Mail Merge Helper organizes the steps differently than the task pane or wizard; the sequence of actions is essentially the same, but they are accomplished in only three steps.
The name "mail merge" suggests that this feature is useful primarily for letters, email messages, or faxes, but it's also great for other items that use text drawn from some form of database and entered into a rigid formatfor example, catalogs and mailing labels.
The main document and the data source
For each mail merge, you need a main document and a data source. The main document
is the template according to which the merged documents are laid out, so if you're creating a form letter, the main document is a letter containing placeholders (called fields
) for the information that will be merged in. The data source
is the file that contains the data that will be merged into the fields in the main document to create the merge documents. The main document is always a Word document (or template), but the data source can be a Word document containing a table, an Excel spreadsheet, an Access database, your address book, or another file that contains data records.
Figure 9-3. Mail merge has a different face in Word 2003 (left) and Word XP than in Word 2000 (right), but the steps are largely the sameas are the results.
Creating or designating the data source
The way in which Word presents the mail merge suggests that you should create the main document before you designate the data source, but this is putting the cart before the horse: you can't finish creating the main document until you know the names of the fields in the data source. First, tell Word whether to use the current document as the main document or open another document. Next, designate the data source to use (or create a new data source) and place the fields in the main document.
Word offers you the choice of using an existing data source or creating a new data source. You should almost always use an existing data source, because creating a new data source usually involves replicating data stored elsewhere. It's far better to spend a couple of hours sorting out your Windows Address Book, your Outlook Address Book, or your customer list in Excel or Access so that you can use it effectively for mail merges in the future than it is to spend an hour updating a custom list each time you need to perform a mail merge. This theory holds no matter what type of data you're working with: customer names, telephone numbers, parts listed in a catalog, or product details for a special offer.
If you need to be able to create a mail merge for only some of your contacts, either put them in a different group or use one of the address fields you never use as a place for storing differentiating information. For example, in the Windows Address Book, the Conferencing Server field and the Conferencing Address box on the NetMeeting tab are rarely used.
Sometimes, however, you will need to create a new data source for a merge. To do so, select the "Type a new list" option in Word 2003 or Word XP, and then click the Create link. In the New Address List dialog box, click the Customize button to display the Customize Address List dialog box (see Figure 9-4). Add, delete, and rename fields so that you have the list you need, and then use the Move Up and Move Down buttons to shuffle the fields into a suitable order.
Click the OK button to close the Customize Address List dialog box, and enter the details of the first record in the New Address List dialog box (see Figure 9-5).
Figure 9-4. When creating a new database for a mail merge, first customize the "address list" so that it includes all the fields you need.
Figure 9-5. After setting up the fields, use the New Address List dialog box to create the records for the database.
The Mail Merge Helper
What's confusing about the Mail Merge Helper is that, because the dialog box is modal (and thus prevents you from working in a document while it is displayed), Word has to hide it so that you can edit the merge document. You then have to redisplay the dialog box manually (by choosing Tools » Mail Merge again or clicking the Mail Merge Helper button on the Mail Merge toolbar) so that you can switch to another action (such as editing the data source) or perform the merge. By contrast, the Mail Merge task pane and wizard remain open throughout the merge process, making it easier to see what's happening. The task pane and wizard also include other time-saving features, such as the ability to insert an entire standard address block of fields at once rather than having to insert them one at a time.
When you've entered all the records, click the Close button and save the database when Word prompts you to do so. Word then displays the Mail Merge Recipients dialog box (see Figure 9-6) so that you can select which people (or items) to include in the mail merge. Click the OK button after you've made your choices, and you'll be ready to create the main document.
Figure 9-6. In the Mail Merge Recipients dialog box, choose the recipients for the mail merge. You can also perform quick filtering by clicking the drop-down arrows in the heading row.
In Word 2000, click the Get Data button and choose Create Data Source from the pop-up menu, and then work in the Create Data Source dialog box (see Figure 9-7). Add a field by typing its name in the "Field name" box and clicking the Add Field Name button; click the Remove Field Name button to remove the selected field name, and use the two Move buttons to rearrange the list into the right order. Click the OK button to close the Create Data Source dialog box, and then save your data source when Word prompts you to do so. Click the Edit Data Source button in the dialog box that Word displays to tell you that the data source contains no records. Word then displays the Data Form dialog box, in which you can add the details of each record in turn. Click the OK button when you've finished entering the records.
Creating the main document
The main document is the template for all the merge documents you're creating. The basic process is pretty simple: create the nonvariable parts of the document, and then insert a merge field wherever variable information is to be drawn in from the data source. Keep the following points in mind:
Figure 9-7. Word 2000 uses a different interface for creating a data source, but the process is similar.
-
You can base the main document on any template or any existing document. For example, you might use your company's letterhead for a mail-merge letter.
-
Include all the spaces and punctuation needed among your merge fields so that the resulting text will be correctly laid out. It's easy to miss the spaces and punctuation when looking at the field codes, but the results will look shoddy. If you normally work without formatting marks displayed, you may find it helpful to display them while laying out your merge. (Click the Show/Hide button on the Standard toolbar to toggle the display of formatting marks.)
-
Use If fields (as discussed in the next Annoyance "Create a Smart Mail Merge with Sorting, Filtering, and If Fields," next) to make decisions where necessary in a merge.
-
You can filter the records in your database so that you get only the ones that match your criteria, and then sort them so that they're in the right order (for example, state by state). Again, see "Create a Smart Mail Merge with Sorting, Filtering, and If Fields," next.
To insert a merge field:
-
In Word 2003 or Word XP, click one of the links ("Address block," "Greeting line," "Electronic postage," "Postal bar code," or "More items") and use the resulting dialog box to enter the merge fields.
-
In Word 2000, click the Insert Merge Field button on the Mail Merge toolbar and choose from the pop-up menu.