Field codes: NextIf field

Microsoft Office Word 2003

Show All Show All

Field codes: NextIf field

{ NEXTIF Expression1 Operator Expression2 }

Compares two expressions. If the comparison is true, Microsoft Word merges the next data record into the current merge document. Merge fields that follow the NEXTIF field in the main document are replaced by values from the next data record rather than the current data record. If the comparison is false, Word merges the next data record into a new merge document.

You may find the SKIPIF field used in documents created in previous versions of Word, but don't use the SKIPIF field in the current version of Word. You can select data records more easily by using the Mail Merge Recipients dialog box, which appears when you connect to a data source during a mail merge.

Note  NEXTIF fields cannot be used in footnotes, endnotes, annotations, headers, footers, or data sources. The NEXTIF field cannot be nested within any field.