View Single Post
 
Old 09-22-2024, 06:29 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

From what you describe, your fields should be coded as:

Code:
{IF{MERGEFIELD Cover_Type}= "E1" {IF{MERGEFIELD Overseas}<> "" "Sentence for this cover"}}
and:
Code:
{IF{MERGEFIELD Waits_Apply}= "Y" {IF{MERGEFIELD Previous_Extras}= "Y" "Sentence for upgrading waits" "Sentence for previous extras"} "Sentence for waits apply"}
If your 'Previous Extras' data field can have content other than Y or N, use:
Code:
{IF{MERGEFIELD Waits_Apply}= "Y" {IF{MERGEFIELD Previous_Extras}= "Y" "Sentence for upgrading waits" {IF{MERGEFIELD Previous_Extras}= "N" "Sentence for previous extras" "Sentence for not Y/N"}} "Sentence for waits apply"}
You can omit the "Sentence for not Y/N" if there's not output for that condition.

Note: The field brace pairs (i.e. '{ }') for the above examples are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac or, if you’re using a laptop, you might need to use Ctrl-Fn-F9); 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. The spaces represented in the field constructions are all required.

For a macro to convert the above field code representations into working field codes, see Convert Text Representations of Fields to Working Fields in the Mailmerge Tips and Tricks 'Sticky' thread at the top of this page: https://www.msofficeforums.com/mail-...ps-tricks.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote