WD: How to Convert Data in One Column to a Table for Merging

Last reviewed: February 3, 1998
Article ID: Q140344
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
  • Microsoft Word for Windows NT, version 6.0
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 98 Macintosh Edition

SUMMARY

Word cannot merge with data when all the information is in one column, as in the following example:

   John Doe
   123 Main Street
   Anytown, US  12345

   Jane Smith
   Microsoft
   456 Elm Street
   Sometown, US  67890

Word needs the information to be laid out in a table or in tab- delimited format:

   Name       Company    Address           City/State    ZIP_Code
   John Doe              123 Main Street   Anytown, US   12345
   Jane Smith Microsoft  456 Elm Street    Sometown, US  67890

This article explains how change data from being in one column to the table that Word expects.

MORE INFORMATION

Data Documents Created in Other Programs

If you created your data document in a different program, find out whether that program can save the data in a different layout. For example, if the data came from a database program, can it save the file with different field and record delimiters? If it can save the data with tab field delimiters and paragraph mark record delimiters, you can use the file in Word without any further modifications. For information on using a text file as a data document in Word, search in Help under merging and using data sources.

WordPerfect Data Documents

For more information on using WordPerfect data documents with Word, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q72117
   TITLE     : WD: How to Convert WordPerfect Merge Data Documents to Word

Convert Text to Table in Word

If you created the list of addresses in Word, or if you cannot rearrange the data using another program, convert the text to a table, which Word can use for merging. To do this, follow these steps:

  1. Save the file containing the list of names and addresses under a different file name:

        a. Open the file that contains the list of names and addresses.
    

        b. On the File menu, click Save As.
    

        c. In the File Name box (Windows) or "Save Current Document as"
           (Macintosh), type a new name for the file.
    

        d. Click SAVE or OK (Word 6.x for Windows).
    

  2. Rearrange the names. The steps below required that each address is separated with a blank line (see the example in the "Summary" section at the beginning of this article).

    NOTE: This method creates a separate field for each line in each address. If you want the information separated further than this, you must press the TAB key at the appropriate points. For instance, if you have typed a first and last name on the same line, the method below creates one field that contains both first and last names. If you want the first and last names to be in separate fields, you must place the insertion point between each first and last name and press the TAB key.

    Also, this method puts the lines into the first available field for each record, so if the records do not have the same number of lines, shorter records will end up with information in different fields than the longer records. If you want to perform conditional merges, in which a certain type of information is expected in certain fields, you need to edit the data file once you have created the table.

    Part 1: Remove Blank Lines Between Records:

          a. On the Edit menu, click Replace.
    

          b. Click in the Find What box.
    

c. Click Special, and select Paragraph Mark. (In Word 97 for Windows and Word 98 Macintosh Edition, click More first). Do this again, so that the Find What box shows "^p^p" (without the quotation marks).

      d. If the No Formatting button is available (not shaded), click this
         button to remove any additional Find formatting criteria.

      e. Click in the Replace With box.

      f. Type three percent symbols.

      g. If the No Formatting button is available (not shaded), click this
         button to remove any additional Replace formatting criteria.

      h. Click Replace All.

         The document now shows the beginning of each record next
         to the end of the preceding record, separated by three
         percent symbols:

            John Doe
            123 Main Street
            Anytown, US  12345%%%Jane Smith
            Microsoft
            456 Elm Street
            Sometown, US  67890

   Part 2: Replace Paragraph Marks with Tab Characters:

      a. Click in the Find What box, and delete the existing text.

      b. Click the Special button and select Paragraph Mark. The
         Find What box now shows "^p" (without the quotation
         marks).

      c. Click in the Replace With box, and delete the existing
         text.

      d. Click the Special Button and select Tab Character. The
         Replace With box now shows "^t" (without the quotation
         marks).

      e. Click Replace All.

         The document shows all records in what appears to be one
         paragraph:

            John Doe  123 Main Street  Anytown, US  12345%%%Jane
            Smith     Microsoft        456 Elm Street   Sometown,
            US  67890

      NOTE: This method produces one extra field when the final
      paragraph is replaced with a tab. You should delete this final tab.

   Part 3:

      a. Click in the Find What box, and delete the existing text.
         Type three percent signs.

      b. Click in the Replace With box, and delete the existing
         text.

      c. Click Special and select Paragraph Mark. Click Replace All.

      d. Click Close to close the Find and Replace dialog box.

   The text is now in the proper format to be converted to a table.

  • On the Edit menu, click Select All.

  • On the Table menu, click Convert Text To Table.

  • In the Separate Text At area, select Tabs.

  • Click OK. The data is now in columns.

  • Click in the first cell of the table. On the Table menu, click Insert Rows.

  • In the first row, type a one-word field name for each column.

  • On the File menu, click Save.

    NOTE: As previously mentioned, if the data for a specific field is in different columns, you need to move the data for those fields to one column. If a column becomes blank, delete it by following these steps:

    1. Place the insertion point into the column.

    2. On the Table menu, click Delete Columns.

    The data document is now ready to merge with a Word main document.


  • Additional query words: howto grey convert 8.0 8.00
    Keywords : kbmerge macword ntword winword word6 word7 word8 word95 word97 wordnt macword98 kbualink97
    Version : WINDOWS:6.0,6.0a,6.0c,7.0,7.0a,97;MACINTOSH:6.0,6.0.1,6.0.1a,98
    Platform : MACINTOSH WINDOWS
    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.