Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Potsy Potsy is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge - If statement Nieve Mailmerge 21 December 23rd 08 12:38 AM
Mail Merge in Word 2000-Hiding static data Scoobs Mailmerge 3 March 20th 07 09:56 AM
mail merge and sql statement Marty Mailmerge 1 April 12th 06 07:54 PM
If statement problems in mail merge jameseyryan Mailmerge 6 August 5th 05 09:29 PM
Mail Merge - Next Record If Statement HiramPat Mailmerge 5 April 22nd 05 04:03 PM


All times are GMT +1. The time now is 11:21 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"