View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default mail merge if statement

It rather depends on what the phone number field produces in Word during a
merge

If it produces the number 0755555555 then what you ask is fairly
straightforward, if it doesn't it would be worth amending the data to
achieve that. If you only have the one country code to consider then you
don't need a conditional field, you need a field switch and the +61 ewntered
as text before it.

+61 { Mergefield Phone \# "0' '0000' '0000" }

If you just want to add the switch to some of your numbers based on country
then

{ IF { Mergefield Country } = "Cocos-Keeling Islands" "+61 { Mergefield
Phone \# "0' '0000' '0000" }" "{Mergefield Phone \# "00' '0000' '0000" }" }

should do the trick.

You could even add a country code to your data source and then merge the two
fields eg

IF {Mergefield Country} "Name of your country" "{Mergefield CountryCode}
{ Mergefield Phone \# "0' '0000' '0000" }" "{Mergefield Phone \# "00' '0000'
'0000" }" }

Where "Name of your country" is the actual country name from your data
source.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



kyle''s wrote:
is it possible to create an if statement to change the format of a
phone number.

we have in our database client phone numbers eg 07 5555 5555, can I
create an if statement to have the number displate as +61 7 5555
5555, or am I asking too much?

Any help would be much appreciated.