WD2000: An Underscore Is Appended to a Merge Field Name (282221)



The information in this article applies to:

  • Microsoft Word 2000

This article was previously published under Q282221

SYMPTOMS

When you create a mail merge document, a merge field may have an extraneous underscore appended to the end of the merge field name.

The extraneous underscore does not appear when you view the merged data and it does not affect the way that the document is printed.

CAUSE

This behavior can occur if the data source for the mail merge document is a Microsoft Excel worksheet, and the column header for one or more of the data fields in the data source is formatted as Accounting. The Accounting format creates space between the contents of an Excel worksheet cell and the cell boundary. The space is represented by an underscore when the column header is used as a data field name.

NOTE: If you click to select the Select method check box in the Open Data Source dialog box, this behavior occurs only when you select either Microsoft Excel Worksheet via Converter or MS Excel Worksheets via DDE, to open the data source.

RESOLUTION

To resolve this issue use either of the following methods.

Method 1: Change the Formatting of Column Headings in Excel

Change the formatting of column headers in the Microsoft Excel worksheet to General or Text. To change the formatting of a column header in Excel, follow these steps:
  1. Start Excel, and then open the document that you want to use as a mail merge data source.
  2. Select the column or the cell that you want to format.
  3. On the Format menu, click Cells.
  4. In the Format Cells dialog box, click the Number tab.
  5. Under Category, click General or Text, and then click OK.

Method 2: Open The Data Source Using "Excel Files via ODBC"

Select the Excel Files via ODBC method to open the data source. To use this method, use the steps in the following example:
  1. Start Word, and open or create a document.
  2. On the Tools menu, click Mail Merge.
  3. Under Main document, click Create.
  4. On the shortcut menu, click Form Letters.
  5. Click Active Window.
  6. Under Data source, click Get Data, and then click Open Data Source.
  7. In the File of type box, select MS Excel Worksheets.
  8. Click to select the Select method check box.
  9. Browse to find the worksheet that you want, and then click Open.
  10. In the Confirm Data Source dialog box, select Excel Files via ODBC, and then click OK.

Modification Type:MajorLast Reviewed:2/7/2001
Keywords:kbprb KB282221