Microsoft KB Archive/65944

Word: Macro Functions Within a Print Merge

PSS ID Number: Q65944 Article last modified on 11-02-1994

5.00

MS-DOS

= SUMMARY =

The macro functions INT, LEN, and MID can be used in conjunction with an IF statement in the main document of a print merge.

For example, the following statement could be used in a main document to print only those records with names containing 14 characters or less:

<15>> <> <> < > <> < < >, < > < > “Name” is a field included in the data document, which contains names of individuals. The above statement merges records from the data document only if the “name” field contains 14 characters or less (records with names of more than 14 characters will be excluded from the print merge).

Note that << is created by pressing CTRL+[, and >> is created by pressing CTRL+].

KBCategory: kbother kbmacro KBSubcategory: kbmerge Additional reference words: ============================================================================= Copyright Microsoft Corporation 1994.