Microsoft KB Archive/38875

Using IF, ENDIF, ELSE, Nested IF Instructions in Print Merge

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

3.x 4.00 5.00

MS-DOS

= SUMMARY =

The IF instruction is a conditional instruction that you can use to instruct Word to print specific text if a condition is met. The IF instruction must end with an ENDIF. You can also use the ELSE clause to tell Word what to print if the condition is not met.

The IF instruction can also be nested, as long as each IF is matched with an ending ENDIF.

= MORE INFORMATION =

The following is a sample syntax:

<>text to print<>

<>text to print<>other text to print<>

<>text to print<>

<>text to print<>other text to print<>

The following is a sample nested IF syntax:

< number>><>text to print<> other text to print<> <>

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