Microsoft KB Archive/66612

-

{| The information in this article applies to:
 * width="100%"|
 * Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c

SUMMARY
When doing a print merge in Microsoft Word for Windows, the NEXTIF and SKIPIF fields may be used as conditions for merging a specific record with the merge document. The asterisk may be used in the second expression to represent a string of characters, and therefore may not be used as a flag character in the data document.

MORE INFORMATION
For example, to merge a specific number of records that are distinguished by a certain character in a heading called a flag, a sample data document could be set up with the following headings

name,street,city,state,zip,flag where &quot;flag&quot; would be a character included in all records to be merged and printed out. In the main document, the line

{SKIPIF {flag} <> &quot;character&quot;} would be included after the data field with the result of merging and printing out each record that contained &quot;character&quot; (without quotation marks) under the flag heading. This statement works for any character with the exception of the asterisk (*). The asterisk is reserved to represent a string of characters (to compare the first expression in the conditional statement with anything that follows the *). Therefore, setting &quot;character&quot; in the above example to * would result in merging and printing all records, whether the record had * in the heading column or not. Reference(s):

&quot;Microsoft Word for Windows User's Reference,&quot; page 98.
 * }

-

Last reviewed: July 30, 1997

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.