If you want to create a set of documents, such as a form letter or an address label page that you send to multiple customers, you can use a mail merge. Each letter or label contains the same type of information, but the content varies. For example, in multiple letters to a customer, each letter can be personalized to address each customer's name. The only information in each letter or label comes from an entry in the data source.
The mail merge process needs to perform all of the following steps:
1. Set the main document. The text and graphics that the main document contains are used to merge all versions of the document. For example, a return address or salutation in a form letter.
2. Connect the document to the data source. A data source is a file that contains information that you want to merge into a document. For example, the name and address of the recipient of the letter.
3. Adjust the recipient list or list of items. Microsoft Office Word generates a copy of the main document for each item (or record) in the data file. If the data file is a mailing list, these items may be the recipients. If you only want to generate replicas for some items in your data file, you can select the items (records) that you want to include.
4. Add placeholders (called mail merge fields) to the document. When you perform a mail merge, the information from the data file is populated in the Mail merge field.
5. Preview and complete the merge. You can preview each copy of a document before you print the entire set of documents.
You can use the commands on the Mailings tab to perform a mail merge.
Tip: You can also use the Mail Merge task pane to perform a mail merge, which walks you through the process step-by-step. To use the task pane, on the Mailings tab, in the Start Mail Merge group, click Start Mail Merge, and then click Mail Merge step-by-step wizard.
Setting up the main document
1. Start Word.
By default, a blank document opens. Leave the document open. If you close the document, you will not be able to use the next command.
2. On the Mailings tab, in the Start Mail Merge group, click Start Mail Merge.
3. Click the type of document you want to create.
For example, you can create:
A group of envelopes: all envelopes have the same return address, but each envelope has a different delivery address. Click Envelopes, and then, on the Envelope Options tab of the Envelope Options dialog box, specify the envelope size and text format that you want.
A set of address tags: each label displays a person's name and address, but each label has a different name and address. Click Label, and then specify the type of label you want in the Label Options dialog box.
A set of form letters or e-mail messages: all the basic content of a letter or message is the same, but each letter or message also contains the recipient's unique information, such as name, address, or other information. Click Letter or e-mail to create the appropriate type of document.
Table of Contents: Each item displays the same type of information, such as the name and description, but each item has a different name and description. Click Directory to create this type of document.
Resume Mail Merge
If you need to stop the mail merge, you can save the main document and then resume the merge later. Microsoft Office Word retains the data source information and domain information. If you are using the Mail Merge task pane before you stop merging, Word will go to where you are in the task pane when you restore the merge.
1. When you are ready to begin the recovery of the merge, open the document.
Word displays a message asking you to confirm that you want to open the document, which will run the SQL command.
2. Because this document is connected to the data source, and you want to retrieve the data, click Yes. If you don't know whether the document is connected to a data source when you open the document, you can click No to prevent potentially malicious access to the data.
At this point, the document text and any fields that you insert are displayed.
3. Click the Mail tab to resume work.
To connect a document to a data source
To merge information into the main document, you must connect the document to a data source or data file. If you do not have a data file, you can create a data file during the mail merge process.
Select Data File
1. On the Mailings tab, in the Start Mail Merge group, click Select Recipients.
2. Do one of the following:
If you want to use the Contacts list in Outlook, click Select from Outlook Contacts.
Tips for working with a Microsoft Outlook contact list
If you already have a Microsoft Office Excel worksheet, Microsoft Office Access database, or other type of data file, click Use existing list, and then locate the file you want in the Select Data Source dialog box.
For Excel, you can select data from any worksheet or named range within the workbook. For Access, you can select data from any table or query that is defined in the database. For other types of data files, select the file in the Select Data Source dialog box. If the file you want is not listed in the list, select the appropriate file type in the File type box or select All files. In a mail merge, you can use the following types of data files:
Files from file-based Single-layer database programs that have installed OLE DB providers or ODBC drivers (many of these database programs are included with Microsoft Office).
An HTML file that contains a single table. The first row of the table must contain the column names, and the other rows must contain data.
Electronic Address Book:
Microsoft Outlook Address Book
Microsoft Schedule+ 7.0 Contact List
Any similar address lists that you create with a MAPI-compliant messaging system, such as Microsoft Outlook.
Microsoft Word documents. The document should contain only one table. The first row of the table must contain a caption, and the other rows must contain the records that you want to merge. You can also use a header source as a data source.
Any text file that contains a tab or comma-delimited data field and a data record delimited by a paragraph mark.
If you do not have a data file, click Type New list, and then use the Open table to create the list. The list will be saved as a database (. mdb) file that can be reused.
Note: If you installed 2007 Microsoft Office System (instead of installing Microsoft Word separately), you can also use Microsoft Query to construct your query and retrieve the data you need from an external data source.
Adjust recipient list or Item list
When you connect to a data file, you may not want to merge information from all the records in that data file into the main document.
To narrow the recipient list or use a subset of the records in the data file, do the following:
1 On the Mailings tab, in the Start Mail Merge group, click Edit Recipient list.
2 in the Mail Merge Recipients dialog box, do any of the following:
Select a single record: This method is best suited for short lists. Select the check box next to the recipients you want to include, and clear the check box next to the recipients you want to exclude.
If you want to include only a few records when merging, you can clear the check box for the header row, and then select only the records you want to merge. Similarly, if you want to include most of the list, you can select the check box in the header row, and then clear the check boxes for the records you don't want to include.
Sort record: Click the column heading for the item you want to sort by. The list is sorted in ascending alphabetical order (from A to Z). Click the column heading again to sort the list in descending alphabetical order (from Z to A).
If you want to make a more complex sort, click Sort under Adjust Recipient list, and select the sort preferences on the Sort Records tab in the Filter and Sort dialog box. For example, you can use this sort method if you want the recipient addresses to be sorted alphabetically by last name within each ZIP code, and the postal codes are in numerical order.
Filter records: This is useful if the list contains records that you do not want to see or include in the merge. After you filter the list, you can use the check boxes to include and exclude records.
To filter records, do the following:
1. Under Adjust recipient list, click Filter.
2. On the Filter Records tab of the Filter and Sort dialog box, select the filter criteria that you want to apply.
For example, if you are only generating a copy of the main document for an address that is Australia for the country/region, click Country or region in the fields list, equals in the Compare list, and Australia in the Compare Objects list.
3. To further adjust the filter, click and or OR, and specify more criteria.
For example, if only a copy of the main document is generated for an enterprise in Munich, a record that filters the City field contains Munich and the company Name field is not empty. If you use or in this filter and do not use and, the mail merge will contain all the addresses of Munich and all the addresses in other cities that contain the company name.
Note: If you have already installed the address verification software, you can verify the recipient address by clicking Verify address in the Mail Merge Recipients dialog box.
Add a placeholder called a mail merge field to a document
After you connect the main document to the data file, you can type the text of the document and add a placeholder that indicates where the unique information is displayed in each copy of the document.
Placeholders, such as addresses and greeting words, are called mail merge fields. The fields in Word correspond to the column headings in the selected data file.
Place a field in the main document, indicating that you want to display an information category, such as a name or address, on that site.
What happens when you merge
When you merge, the information in the first row of the data file replaces the fields in the main document, creating the first merged document. The information in the second row of the data file replaces the field, creating a second merged document, and so on.
Working with Fields: example
You can add any column headings in your data file as fields to your main document to provide flexibility for designing form letters, labels, e-mail messages, and other merged documents. For example:
Suppose you want to create a letter that notifies some local enterprises that you have included these enterprises in the annual city guide book. If your data file contains a company column that lists the names of each enterprise that you want to contact, you can insert the «Company» domain without having to type the names of those companies individually.
Suppose you want to send a quarterly e-mail message to a customer that is a notification of new products and special offers. If you want to personalize the message to the best customer, you can add a personal note column to the data file, where you can type a note, such as: "Miss Miller, this new piece of jewelry is exactly what you always wanted." ”。 After you insert the «Personal notes» fields in your main document, you can add these notes at the bottom of some messages.
Assuming your mailing list is used for newsletter subscribers, your data file contains a column named "Expiration Date" to store each subscription expiration date. If the «Expiration Date field is placed in the label main document before you run the merge, each Subscriber will see their subscription expiration date on their mailing labels.
You can use punctuation to combine and separate fields. For example, to create an address, you can set a field like this in a main document:
«Name»«Last name»
«Street Address»
«City»,«Province/city»«zip code»
For frequently used content, such as address blocks and greetings, Word provides a composite field that combines multiple fields. For example:
An address block field is a combination of several domains, including first name, last name, street address, city, and postal code.
The greeting field can contain one or more name fields, depending on the salutation you select.
You can customize the contents of each compound field. For example, in an address, you might want to choose the formal name format (for example, "Mr. Ningjia"), and in the greeting, you might want to write the name of the other person without "respect."
To map a mail merge field to a data file
To ensure that word can find a column in your data file that corresponds to each address or greeting element, you might want to map the mail merge fields in Word to the columns in your data file.
To map the fields, click Match fields in the Write and Insert Fields group on the Mailings tab.
The elements of the address and greeting are listed on the left. The column headings in the data file are listed on the right.
Word searches for the columns that match each element. In the illustration, Word automatically matches the last Name column of the data file with the last name. However, Word cannot match other elements. For example, in this data file, Word cannot match the name.
In the list on the right, you can select a column from the data file that matches the left element. In the illustration, the Name column now matches the name. "Honorific", "unique identifier", and "middle name" do not match. Mail merge documents do not need to use all fields. If you add a field that does not contain data from the data file, the field appears as an empty placeholder in the merged document, and the empty placeholder is usually either a blank row or a hidden field.
Type content and Add fields
1. In the main document, click where you want to insert the field.
2. Use the Write and Insert Fields group on the Mailings tab.
Comments:
You cannot manually type merge field characters (««»») or use the symbol command on the Insert menu. You must use mail merge.
If the merge fields appear within curly braces, such as {MERGEFIELD City}, Microsoft Word displays the field codes without displaying the field results. This does not affect the merge, but if you want to display the results, right-click the field code, and then click Toggle Field Codes on the shortcut menu.
Set the format of merged data
Database and spreadsheet programs, such as Microsoft Office Access and Microsoft Office Excel, store information that is typed into cells as raw data. Formats that you apply in Access or Excel, such as fonts and colors, are not stored with the original data. When you merge information from a data file into a Word document, you merge the original data without the formatting you applied.
To format the data in your document, select the Mail merge field and format it as if you were formatting any text. Make sure the selection contains angle brackets («») on both sides of the field.
Preview and complete the merge
After you add a field to the main document, you can preview the merged results. If you are satisfied with the preview results, you can complete the merge.
Preview Merge
You can preview and change the merged document before you actually complete the merge.
To preview, do any of the following in the preview results group on the Mailings tab:
Click Preview Results.
Preview the merged document page by piece by using the next record and previous record buttons in the preview results group.
Preview a specific document by clicking Find Recipient.
Note: Click Edit Recipient list in the Start Mail Merge group on the Mailings tab to open the Mail Merge Recipients dialog box, where you can filter the list or clear the recipients if there are records that you do not want to include.
Complete the merge
You can print the merged document, or you can modify it separately. You can print or change a subset of all documents or documents.
Print merged documents
1. On the Mailings tab, in the Finish group, click Finish and Merge, and then click Print Document.
2. Select whether to print the entire set of documents, only the currently visible copy, or a subset of the documents specified based on the record number.
Change a single copy of a document
1. On the Mailings tab, in the Finish group, click Finish and Merge, and then click Edit Individual Documents.
2. Select whether to edit the entire set of documents, only the currently visible copy, or a subset of the documents specified based on the record number. Word saves the edited copy to a file, separating each copy of the document with a page break.
Save main Document
Keep in mind that the saved merged document is separate from the main document. If you want to use the main document for another mail merge, it's a good idea to save the main document.
When you save the main document, you also save the connection to the data file. The next time you open the main document, you will be prompted to choose whether you want to merge the information from the data file into the main document again.
If you click Yes, the document opens with information about the first record that was merged.
If you click No, the connection between the main document and the data file is disconnected. The main document becomes a standard Word document. The field will be replaced by the unique information in the first record.