where 'MyField' is a field in the data source that determines whether the variable text is to be displayed. The variable text can include multiple paragraphs, tables & pictures if need be.
In the above example, it is assumed you want nothing displayed if 'MyField' is empty. Changing the '<>' to '=' inverts the test. Thus, if you only want the variable text to display if 'MyField' has a specified value (e.g. 'MyValue'), you could use a field
coded like:
Note: The field brace pairs (i.e. '{ }') for the above example are 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 practicable to add them via any
of the standard Word dialogues. Likewise, you can't type or copy & paste the chevrons (i.e. '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar. The spaces represented in the field construction are all required.
Cheers Paul Edstein (Fmr MS MVP - Word)
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.