#1
|
|||
|
|||
IF... THEN... ELSE... rule to insert a Mailmerge Field
I need to create a mailmerge with this logic.
IF [mergefield OKtoPublish = "True"] THEN insert [mergefield PhoneNumber] ELSE insert "" The If... Then... Else rule system lets you insert TEXT, not mergefields. However, it is a mergefield that I need to insert. This thread in the UK Access Programmers Forum states: Quote:
Quote:
I've tried (I think) to implement the suggested solution, but I'll be darned if I can make it work. Any suggestions? |
#2
|
|||
|
|||
You most certainly can use an If...then...Else field to insert the contents of a MergeField
For your example, insert the following mergefields and text «OKtoPublish» = True «PhoneNumber» "" then, select the above mergefields and text and press CTRL+F9 which will enclose it in a pair of field delimiters { «OKtoPublish» = True «PhoneNumber» "" } Then insert the word IF as shown below { IF «OKtoPublish» = True «PhoneNumber» "" } Then press ALT+F9 twice to toggle of the display of the field codes in the document. Note: You MUST use CTRL+F9 to insert the field delimiters. It will NOT work if you insert the directly by the use of the { and } keys. |
#3
|
||||
|
||||
Quote:
For your scenario, all you need is a field coded as: {IF«OKtoPublish»= True «PhoneNumber»} 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] |
#4
|
|||
|
|||
Thank you DougMVP and macropod for your help. Your suggestions worked brilliantly - and saved the day.
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using IncludePicture and MailMerge to insert picture | Elena | Mail Merge | 25 | 02-06-2022 05:35 PM |
Removing Return from Address field in Mailmerge | Formd | Mail Merge | 2 | 04-27-2015 10:07 PM |
Mailmerge field format? | Rothera85 | Mail Merge | 9 | 05-11-2014 03:41 PM |
Mailmerge printing with field names | Jvallee | Mail Merge | 9 | 04-16-2014 06:30 PM |
Yes/No field does not work in mailmerge | Abacus1234 | Mail Merge | 10 | 10-14-2013 06:37 AM |