Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Mail Merge hiding Country on IF Statement!
Hi
I have had a look through the posts and cannot figure out how to do the above in Word 2003. I have all my mail merge fields in word linking via ODBC excel file. I want to be able to hide the "Country" field if it is "United Kingdom" - how do I go about doing this. I have right clicked on field and toggled code and put following on but does not allow me to toggle back { IF {MergeField "Country" } = "United Kingdom" "" } I have also tried adding it in Edit Field (right clicking on the merge field) inputting in IF section but does not allow me to select OK and close. There must be something I am doing wrong??? Thanks! |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Mail Merge hiding Country on IF Statement!
It sounds like you did not use Ctrl+F9 to insert the field delimiters. You
cannot enter those by use of the { and } keys on the keyboard. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Potsy" wrote in message oups.com... Hi I have had a look through the posts and cannot figure out how to do the above in Word 2003. I have all my mail merge fields in word linking via ODBC excel file. I want to be able to hide the "Country" field if it is "United Kingdom" - how do I go about doing this. I have right clicked on field and toggled code and put following on but does not allow me to toggle back { IF {MergeField "Country" } = "United Kingdom" "" } I have also tried adding it in Edit Field (right clicking on the merge field) inputting in IF section but does not allow me to select OK and close. There must be something I am doing wrong??? Thanks! |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Mail Merge hiding Country on IF Statement!
After viewing Doug's comments, the syntax you need is
{IF{Mergefield Country \*Upper} "UNITED KINGDOM" "{Mergefield Country}"} or even {IF{Mergefield Country \*Upper} "UNITED K*" "{Mergefield Country}"} The \*Upper switch will allow for all case versions of United Kingdom in the data file. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Potsy wrote: Hi I have had a look through the posts and cannot figure out how to do the above in Word 2003. I have all my mail merge fields in word linking via ODBC excel file. I want to be able to hide the "Country" field if it is "United Kingdom" - how do I go about doing this. I have right clicked on field and toggled code and put following on but does not allow me to toggle back { IF {MergeField "Country" } = "United Kingdom" "" } I have also tried adding it in Edit Field (right clicking on the merge field) inputting in IF section but does not allow me to select OK and close. There must be something I am doing wrong??? Thanks! |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mail Merge - If statement | Mailmerge | |||
Mail Merge in Word 2000-Hiding static data | Mailmerge | |||
mail merge and sql statement | Mailmerge | |||
If statement problems in mail merge | Mailmerge | |||
Mail Merge - Next Record If Statement | Mailmerge |