WD98: How to Create a Merge Document Using a Text Data Document

Last reviewed: February 3, 1998
Article ID: Q178716
The information in this article applies to:
  • Microsoft Word 98 Macintosh Edition

SUMMARY

This article provides detailed instruction on creating a simple mail merge using data stored in a text document. By following these instructions you will create a form letter (main document), select the text data document, and merge the information in the two documents into a third document.

MORE INFORMATION

The following is general information about the appropriate format for a text document that will be used as a data document in a simple Microsoft Word mail merge.

The data should be separated by a special character called a delimiter. The most common delimiters are commas and tabs. When a comma is used as a delimiter, the text in each field is usually enclosed in quotation marks so that a punctuation mark inside a field will not be interpreted as a delimiter.

What Is a Record?

A record consists of a series of fields separated by delimiters. Each record ends with a paragraph mark. Records may appear to extend over multiple lines but each record ends at the first paragraph mark. In a text data source, each record must have exactly the same number of delimiters in it, as in the following example:

   "FName","LName","Address1","Address2"<RETURN>
   "Betty","Smith","1401 A St.","Apt. 5"<RETURN>
   "George","Jones","345 Pile Ln.",""<RETURN>

In this example, the first record has four fields separated by three commas (delimiters), while the text in the fields is enclosed in quotation marks. The word <RETURN> represents the character you get when you press the RETURN key. This denotes the end of the record. The first record (header record) will contain the field names that will be used for the merge, while the second and subsequent records contain the actual data. Notice that the last field in the third record has no information in it, but the delimiter (comma) and quotation marks are still required to hold its place. There must be the same number of delimiters in every record. Any field can be left empty in any record except the first record, which must contain a field name for each field. The delimiters on each side of an empty field must be in place.

Field names should contain no punctuation and usually consist of one word. Spaces can be used in field names but it is better to use one-word field names until you are more familiar with the process.

TIP: Combining information in separate fields in a merge document is easy; however, separating information in a field is difficult. So, when you create a data document, create as many fields as is practical. For example, you may want to put the first name in a field separate from the last name to make it easy to sort the records in the data document by last name. Keeping the first and last name separate will also make it easy to use only the first name in a salutation.

Once you have created and saved your data document, use the following instructions to create a form letter and perform a mail merge using the data stored in the text document.

CREATING THE MAIN DOCUMENT

To create the main document, follow these steps:

  1. Start Microsoft Word 98 Macintosh Edition by double-clicking the Microsoft Word icon in the Microsoft Office 98 folder.

    The insertion point should be blinking in Document1. This indicates that Document1 is the active document.

  2. On the Tools menu, click Mail Merge.

  3. Under Main Document, click Create, and select Form Letters.

  4. Click Active Window.

  5. Under Data source, click Get Data.

Selecting the Data Source

  1. From the list of commands under Get Data, click Open Data Source.

  2. Navigate to the folder that contains the text data document.

  3. Change the List Files Of Type selection to Text Files, select the text

        file containing the data, and click Open.
    

  4. If the Header Record Delimiters dialog box is displayed, select the correct field delimiter and record delimiter and click OK.

  5. Click Edit Main Document.

EDITING THE MAIN DOCUMENT

The insertion point should be back in Document1 (that is, Document1 should be the active document) and the Mail Merge toolbar should be visible.

To edit the main document (Document1 in this case), follow these steps:

  1. Type some text in the document.

  2. On the Mail Merge toolbar, click Insert Merge Field, and select a field name from the list.

    Repeat steps 1 and 2 as many times as necessary to create the appropriate text and desired number of merge fields in the main document.

    NOTE: When you merge data, you can use as few or as many of the data fields as you need to and you can use them in any order. Also, each field can be used more than one time.

  3. To save the main document, click Save As on the File menu.

    TIP: The name should indicate that this is a Main document (for example, name the file "My Main Document"). The document should be stored in the same location (folder) as the data document.

MERGING THE MAIN DOCUMENT AND THE DATA DOCUMENT

To perform the merge, click the Merge To New Document button on the Mail Merge toolbar. This creates a new document containing the results of the merge. This new document can be printed, saved, or deleted without affecting either the main document or the data document.

TIP: Once you have a simple merge working correctly, details can be changed one at a time to increase the complexity of the merge. Be sure to test the merge after you make a change.

REFERENCES

For information about how to do this in other versions of Word, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q142756
   TITLE     : WD: How to Design and Set Up Mail Merge Data Sources

   ARTICLE-ID: Q141922
   TITLE     : WD: How to Start a Mail Merge

For more information about mail merge and data document types, click the Office Assistant, type "mail merge data" in the query area of the Office Assistant and click Search.

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Word Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q120802
   TITLE     : Office: How to Add/Remove a Single Office
               Program or Component


Additional query words: form letter mailmerge standard bulk mailing
multiple
Keywords : kbmerge kbfaq
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 3, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.