![]() |
|
#8
|
||||
|
||||
|
Properly implemented, the field code demonstrated in Graham's post will work. At its simplest, you can use either:
{IF{MERGEFIELD Request_Staff_Person}= "Minnie Mouse" "Mickey Mouse"}{IF{MERGEFIELD Request_Staff_Person}= "Donald Duck" "Another Mouse"} or: {IF«Request_Staff_Person»= "Minnie Mouse" "Mickey Mouse"}{IF«Request_Staff_Person»= "Donald Duck" "Another Mouse"} 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] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
IF statement in Word VBA
|
BristolJGM | Word VBA | 2 | 09-16-2017 06:02 AM |
| and if statement in word mailmerge | sbye | Mail Merge | 17 | 08-25-2017 09:59 PM |
| VBA Word - Find & Apply Styles to Specific Words - Using Case Statement | jc491 | Word VBA | 17 | 12-26-2015 12:25 PM |
Microsoft Word IF statement issues
|
micro44 | Word | 4 | 10-23-2014 12:10 PM |
| Help with IF statement in word 2010 | Mad | Word | 2 | 04-06-2013 06:31 AM |