Second Expression in Conditional Print Merge StatementLast reviewed: July 30, 1997Article ID: Q66612 |
The information in this article applies to:
SUMMARYWhen 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 INFORMATIONFor 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,flagwhere "flag" would be a character included in all records to be merged and printed out. In the main document, the line
{SKIPIF {flag} <> "character"}would be included after the data field with the result of merging and printing out each record that contained "character" (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 "character" 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): "Microsoft Word for Windows User's Reference," page 98.
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |