Microsoft KB Archive/206131

= WD98: Merge Field That Contains an Apostrophe in a Word 5 Document Causes Syntax Error =

Article ID: 206131

Article Last Modified on 10/4/2002

-

APPLIES TO


 * Microsoft Word 98 for Macintosh

-



This article was previously published under Q206131



SYMPTOMS
When you open a main merge document that was created in Microsoft Word 5 for Macintosh, any merge field that contains an apostrophe in its name (for example, "mother's_maiden_name") causes Microsoft Word 98 to display an Invalid Merge Field dialog box. The parts of the field name to the left and right of the apostrophe are treated as two separate field names (for example, "mother" and "s_maiden_name"), whereas the data source has only one field name. The field name, as it is displayed in the Merge Field list, does not appear to contain an apostrophe, but if the data source file is opened in Word 5 for Macintosh, the field name does, in fact, contain an apostrophe.

If you attempt to replace either of the truncated field names with the correct field from the data source, you receive the following error message in the main merge document in place of the merge field:

!Syntax Error,'



CAUSE
This behavior occurs because Word treats the apostrophe as a break and divides the single merge field into two fields, even when this is not the case in the data source.



WORKAROUND
Re-insert the merge field from the data source. To do so, follow these steps:
 * 1) In the main merge document, select the merge field that contains the !Syntax error,' error message, and then press DELETE.
 * 2) On the Mail Merge toolbar, click Insert Merge Field, and then click the data field that you want to insert.



STATUS
Microsoft has confirmed that this is a problem in Microsoft Word 98 Macintosh Edition.



MORE INFORMATION
For more information about inserting merge fields in a mail merge document, follow these steps:  On the Help menu, click Contents and Index. If you are using a version of the Macintosh operating system that is earlier than 8.0, click Contents and Index on the Balloon Help menu. In Word Help, click Index, and then type the following text:

merge

 Click Show Topics. Click the merge fields, inserting in document topic, and then click Go To.

If you cannot find the information that you want, ask the Office Assistant.

Additional query words: OFF98 mac macword merge WD98 WD2001 Word macintosh print data source alert wrong code statement

Keywords: kbbug kbpending KB206131

-

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

© Microsoft Corporation. All rights reserved.