Print Merge Error Message: Syntax Error in Field Condition

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} 


REFERENCES

"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

Additional query words: winword2 1.0 1.10a 2.0 winword word6 2.0a-cd errmsg err msg

Keywords : kbprint kbmerge
Version : WINDOWS:1.0,1.1,1.1a,2.0,2.0a,2.0a-CD,2.0b,2.0c,6.0,6.0a,6.0c
Platform : WINDOWS
Issue type :


Last Reviewed: December 28, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.