WD95: Word Removes Underscore Characters from Mergefield Names

Last reviewed: February 5, 1998
Article ID: Q179354
The information in this article applies to:
  • Microsoft Word for Windows 95, versions 7.0, 7.0a

SYMPTOMS

In a Microsoft Word mail merge main document, when you click the Insert Mail Merge button on the Mail Merge toolbar, you will not see underscores in the mergefield names that are stored in the header row of a tab-delimited or comma- delimited data source.

For example, if the header row in your data source contains the following

   "First_Name","Last_Name","Address"

you will see the following when you click the Insert Mail Merge button:

   FirstName
   LastName
   Address

CAUSE

The names that contain underscore characters in the header row of the data source are enclosed in quotation marks.

WORKAROUND

To work around this behavior, remove the quotation marks from the mergefield names in the header row of your comma-delimited or tab-delimited data file and save the data source. In addition, if the mergefields were previously inserted into a Word 7.0 main document without the underscores, you will need to remove and re-insert them and then save the main document.

MORE INFORMATION

If you keep the quotation marks in the header row, when you insert the merge fields in the main document, they will appear without the underscores. You will experience no further problems if you continue to work in this version of Word. However, if you open this file in Word 97, you will receive the following message:

   This mergefield is used in the main document, but it does not exist
   in the data source.

followed by the name of the invalid mergefield and the following message:

   You can remove the invalid merge field from the main document.
   Or you can replace it with a valid mergefield from the data source.

This error will appear because the mergefields in the main document file will not contain underscore characters, but the merge fields in the data source will.

You can replace the invalid mergefield name by clicking a valid mergefield name in the list of all available merge fields presented in this message box.

If you save the document in Word 97 format, and then reopen it in Word 7.0, you will experience the same results because the mergefields will be mismatched. To resolve this behavior, you will need to replace the mergefields that contain the underscore characters with mergefields that do not.

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q115247
   TITLE     : WD: Cannot Cancel "Invalid Merge Field" Error Loop


Additional query words: recognize remove removes show showing seeing display
displayed displays
Keywords : kbmerge
Version : WINDOWS:7.0,7.0a
Platform : WINDOWS
Issue type : kbprb
Solution Type : kbworkaround


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 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.