The information in this article applies to:
SUMMARYThis article describes the acceptable format for a mail merge data source along with suggestions and questions that are helpful to ask yourself as you create a data source. MORE INFORMATION
The easiest data source format to work with is a Word table; however, you can use any database-like format, such as a text file in which fields are
separated by commas or tabs, and records are separated by paragraph marks. How to Plan and Organize Your Data SourceBefore creating a data source, decide what information you want to include and how you want to use that information, and then design the database. In the long run, this saves you time and work. Ask yourself the following questions as you prepare your data source.Q. Will some records have more information than others? A. Some of your data records may have more information than other records. For example, some entries may have a business name, a department title, and up to three lines for the address. Other entries may have only a name, a one-line street address, and a third line with the city, state, and ZIP code. In the data source, however, each data record must have the same number of data fields. Design the data source so that it has enough data fields to correspond to the record with the most fields. You do not need to fill in every field in the data record; you can leave some fields blank. Word automatically suppresses blank records. Q. Do you plan to sort the data? A. If you intend to sort your data, you need to arrange it so that you can sort the data based on some criteria. For example, the city, state, and ZIP code are usually printed on the same line of a mailing label, so you might want to include all of this information in the same field. If you do this, you cannot sort your records based on the state or the ZIP code. In this case, you should separate each piece of information into a separate field. The same is true if you want to sort your data by the addressees' last names. In this case, you need to separate the last names and the first names into separate fields. Q. Do you want to use a POSTNET bar code? A. To speed mail delivery in the United States, you can print a POSTNET bar code on mailing labels and envelopes. To use the bar code, both the addressee's ZIP code and the delivery address (street name and number or post office box) must be in their own data fields, separate from all other parts of the address. Q. Will you use information in a particular field in different ways? A. In a form letter, the first line of the inside address usually contains a title and the recipient's complete name, for example, Mr. Gerard LaSalle. The salutation, on the other hand, may contain only the title and last name (Dear Mr. LaSalle) or only the first name (Dear Gerard). If you place the title, first name, and last name in separate fields, you can use the same field to print the last name in both the address and the salutation. Alternatively, you can use one field for the complete title and name in the inside address, and a second field for the title and last name in the salutation. Q. Will you use the data source for several merge documents? A. You can merge a single data source with any type and number of main documents. In setting up a data source for printing form letters, plan the addressee information so that you can use the same data source to print the addresses on mailing labels or envelopes. Q. How many fields (pieces of information) do you have for each record (the collection of the pieces of information)? A. If you have a few pieces of information for each record, you can use the Mail Merge Helper (on the Tools menu) in Word. There is a limitation of 63 fields in the Mail Merge Helper. If your number of fields exceeds this value, you should not use the Mail Merge Helper. Instead, create the data source as a tab or comma-delimited text file, in a Microsoft Excel spreadsheet, or in a Microsoft Access database. For additional information about Mail Merge Limitations, please see the following article in the Microsoft Knowledge Base: Q238237 WD2000: Print Merge Data Document Can Contain More Than 32,000 Fields Organizing Data in Tables or ParagraphsWhen you create a data source through the Mail Merge Helper, Word sets up the data source in a table. The table contains a column for each field name you specify in the Create Data Source dialog box. The first row of the table is your header row; each subsequent row contains the information for one data record.Although text might wrap in each cell, it will be printed correctly. If you use an existing data source or set up the data source in Word without using the Mail Merge Helper, you need to organize the data as follows:
Designing a Data Source That Contains Many FieldsThe Mail Merge Helper creates a table for the datafile. In Microsoft Word 2000, the maximum number of fields (table columns) is 63.If you need more data fields in your data source, Word cannot organize the data in a table. Instead, you can set up your information as separate paragraphs in a Word document. The header record and each data record must end with a paragraph mark, which is the data record delimiter. Each field name in the header record and each field in the data record must be separated by a tab character or comma, which is the data field delimiter. If any of the data fields is empty, you need to include a field delimiter to identify the empty field. If you are using a data source from a database or spreadsheet program, you can export this data to an ASCII text format, separated by commas or tabs, or you may be able to attach the database using ODBC, DDE, or a converter. If you export your data to an ASCII format and Word doesn't automatically recognize the field and record delimiters, Word prompts you to select the delimiters when you first use the data source. When you set up a data source in this format in Word, you should use a paragraph mark as the data record delimiter and a tab character or comma as the data field delimiter. In addition to the general rules for organizing a data source, the following rules also apply to data sources set up as regular text:
Deciding When to Use a Separate Header SourceIn most cases, it's convenient to list the field name for each data field in the first row, or record, of the data source. However, you may want to list the field names in a separate header source for the following reasons:
Designing a Header SourceWhen you specify a header source, keep the following rules in mind:
Using a Header Record from Another Data SourceIf you have a data source that contains a header record, you can use it as a header source. For example, if you've broken up your data source into several documents, you can specify the field names in the header record of the first data source. When you merge from other data sources that don't have a header record, specify the first data source as the header source. Then specify each of the remaining data sources in turn.Word ignores the data records from the first data source and uses only the header record. Types of Data You Can Use with Mail MergeYou can merge virtually any type of information from a mail merge data source, including:
Types of Data You Cannot UseYou cannot merge text or graphics contained in a frame in the data source. However, you can position merge fields inside frames. When you merge the documents, the text and graphics from the data source are positioned in the frame.REFERENCESFor more information about mail merging in Word, click Microsoft Word Help on the
Help menu, type Overview of mail merge in the Office Assistant or
the Answer Wizard, and then click Search to view the topic. Additional query words:
Keywords : kbdta kbmerge wd2000 |
Last Reviewed: July 30, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |