That's easily done via two simple IF tests. For example:
{IF{MERGEFIELD FieldName}= "X" "conditional output for X"}{IF{MERGEFIELD FieldName}= "XYZ" "conditional output for XYZ"}
or:
{IF«FieldName»= "X" "conditional output for X"}{IF«FieldName»= "XYZ" "conditional output for XYZ"}
where 'FieldName' is the name of the field containing the X & XYZ strings. If the conditional output is to start a new page, simply insert a manual page break as the first character of the conditional output.
Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. Likewise, the chevrons (i.e. '« »') are part of the actual mergefields - which you can insert from the 'Insert Merge Field' dropdown (i.e. you can't type or copy & paste them from this message, either). The spaces represented in the field constructions are all required.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|