Mail Merge hiding Country on IF Statement!

P

Potsy

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!
 
D

Doug Robbins - Word MVP

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
 
G

Graham Mayor

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

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top