Microsoft KB Archive/179354

= WD95: Word Removes Underscore Characters from Mergefield Names =

Article ID: 179354

Article Last Modified on 8/17/2005

-

APPLIES TO


 * Microsoft Word 95 Standard Edition
 * Microsoft Word 95a

-



This article was previously published under Q179354



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:

115247 WD: Cannot Cancel "Invalid Merge Field" Error Loop

Additional query words: recognize remove removes show showing seeing display displayed displays

Keywords: kbmerge kbprb KB179354

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.