![]() |
|
#1
|
|||
|
|||
|
Hi,
Struggling with this... I want to omit my ADDRESS3 merge field if it contains the exact text "NO LOCALITY", but to merge it if it contains anything else. (Word 2013, Windows 7 64bit.) Thanks |
|
#2
|
||||
|
||||
|
Try:
{IF{MERGEFIELD ADDRESS3}<> "NO LOCALITY" "{MERGEFIELD ADDRESS3}¶ "} or: {IF«ADDRESS3»<> "NO LOCALITY" "«ADDRESS3»¶ "} where the ¶ is the actual line/paragraph break that terminates the existing Address3 line (this adds the end of the field code to whatever line follows your Address3 line). 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 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. Instead of the ¶ symbols, you should use real line/paragraph breaks.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
Thank you Paul,
The first example seems to work fine. I think my problem had been that I was typing the braces in rather than using Ctrl+F9 Only thing I can't figure out now is how to insert the ¶ that's in your instructions. Regards Mike |
|
#4
|
||||
|
||||
|
Try pressing the ENTER key...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
| Tags |
| mailmerge omit field |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Delete specific text
|
Jackson | Word VBA | 16 | 12-06-2019 08:24 PM |
| How do I output text to a specific cell (x,y)? | norwood | Word VBA | 2 | 01-31-2014 08:43 AM |
Delete specific mass text on document
|
JadeRisley | Word | 4 | 07-17-2013 11:11 PM |
IF statement just generates text "MERGEFIELD" in document - what am I doing wrong?
|
Eri | Mail Merge | 1 | 03-03-2012 03:03 PM |
Mail Merge to print specific record based on mergefield criterias
|
nicnad | Mail Merge | 1 | 02-22-2012 01:53 AM |