Print Merge Error Message: Syntax Error in Field Condition

Last reviewed: February 5, 1998
Article ID: Q90460
The information in this article applies to:
  • Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c

SUMMARY

In Word for Windows, the following error messages occur during a print merge operation if a condition is missing from a NEXTIF, IF, or SKIPIF field or if the field does not contain proper spacing:

   There is a syntax error in a field condition.

   Syntax error in field condition.

MORE INFORMATION

Use NEXTIF, IF, and SKIPIF fields in a print merge main document to specify the conditions under which a record should be merged. In the following example, Word for Windows only merges records if the ZIP field contains "98008:"

   {NEXTIF zip = 98008}
   {name}
   {street}
   {city}, {state} {zip}

Missing Condition

Switch to field codes view and verify that each NEXTIF, IF, and SKIPIF field in the document contains a condition. If you do not specify a condition, the error messages occur and the print merge operation stops.

The following example demonstrates an incorrectly used NEXTIF field:

   {NEXTIF zip}

The following example demonstrates a correctly used NEXTIF field:

   {NEXTIF zip = 98008}

Incorrect Spacing

The error messages occur if the spacing in any NEXTIF, IF, or SKIPIF field is incorrect. Each field must contain a space between each expression and the operator. In the following example, there must be a space between "NEXTIF" and "zip", between "zip" and "=" and between "=" and "98008":

   {NEXTIF zip = 98008}

Reference(s):

"Microsoft Word for Windows User's Guide," version 2.0, pages 640-641, 753

"Microsoft Word for Windows User's Reference," version 1.x, pages 199, 424


KBCategory:
KBSubcategory: kbmerge
Additional query words: winword2 1.0 1.10 1.10a 2.0 winword
word6 2.0a 2.0a-cd 2.0b errmsg err msg
Keywords : kbmerge kbprint
Version : 1.x 2.x 6.0 6.0a 6.0c
Platform : WINDOWS


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.