Microsoft KB Archive/125220

WD: “Unknown Op Code” in Converted 5.x Mail Merge Document

PSS ID Number: Q125220 Article last modified on 11-11-1998

MACINTOSH:6.x,98;WINDOWS:6.x,7.x,97

MACINTOSH WINDOWS

================================================================ ==

The information in this article applies to:

 == Microsoft Word for the Macintosh, versions 5.x, 6.x == 

= SYMPTOMS =

After you convert a Microsoft Word 5.x mail merge main document to Word 6.x or later, you may receive one of the following errors in place of a conditional merge field:

  “Error! Unknown op code for conditional.” This error occurs when field codes are activated in the main mail merge document. -or-   “A field calculation error occurred in record .” This error occurs during the merge process. It is followed by the previous error message, appearing in place of the merge result. 

= CAUSE =

This behavior occurs when Word converts a conditional field that is testing for numeric data (such as a ZIP Code field). By contrast, this behavior does not occur when the conditional field is testing for alphabetic data.

= WORKAROUND =

Use either of the following methods to modify the conditional field so that it correctly merges numeric data.

Method 1: Modify the Converted Field Codes
  Turn fields codes on. (On the Tools Menu, click Options. On the View tab, click Field Codes, and then click OK.) Your field code looks like this: {If {MERGEFIELD Zip } “{MERGEFIELD Zip}” &quot;&quot;}   Place the insertion point after the first {MERGEFIELD Zip}.   Type “<>” (without the quotation marks). Your field code should now look like this: {If {MERGEFIELD Zip }<> &quot;&quot; “{MERGEFIELD Zip}” &quot;&quot;} </li>  Turn Field Codes off. </li></ol>

Method 2
Delete the converted conditional field codes and reinsert them using Word 6.0.

= STATUS =

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

= MORE INFORMATION =

For more information about conditional statements, please see the following articles in the Microsoft Knowledge Base:

ARTICLE ID: Q105888 TITLE : WD: How to Merge Conditional Number of Records to the Same Page

ARTICLE ID: Q165635 TITLE : WD: Conditional MERGEFIELD Lost When Converted to MacWord

ARTICLE ID: Q97484 TITLE : WD: Conditional Alphanumeric Merge May Yield Incorrect Results

ARTICLE ID: Q29193 TITLE : WD: Print Merge Only Certain Records from a Data Document

Additional query words: mail merge print merge conditional if endif unknown op code error message errmsg

=
========================================================= Keywords : kbinterop wordnt word8 kbfield macword98 winword kbmerge ntword macword word6 word7 word95 Version : MACINTOSH:6.x,98;WINDOWS:6.x,7.x,97 Platform : MACINTOSH WINDOWS Issue type : kbbug kbinfo ============================================================================= Copyright Microsoft Corporation 1998.