Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / October 2007

Tip: Looking for answers? Try searching our database.

mail merge if statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kyle''s - 09 Oct 2007 06:44 GMT
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.
Graham Mayor - 09 Oct 2007 08:53 GMT
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.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

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

> is it possible to create an if statement to change the format of a
> phone number.
[quoted text clipped - 4 lines]
>
> Any help would be much appreciated.
kyle''s - 10 Oct 2007 00:17 GMT
Thank you Graham! You are a life saver!  

> It rather depends on what the phone number field produces in Word during a
> merge
[quoted text clipped - 33 lines]
> >
> > Any help would be much appreciated.
kyle''s - 10 Oct 2007 03:23 GMT
Hi Graham,

thanks for you quick response!  I have another questions for you (lucky
you). lol

The way all of our users enter the phone number into our database system is
07 5555 5555 or (07) 5555 5555.  The country code is ok cause we will only be
using the one eg. +61.  Is there a way of the phone number being displayed as

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

without having to amend all our records in our database to 0755555555?

many thanks.

> It rather depends on what the phone number field produces in Word during a
> merge
[quoted text clipped - 33 lines]
> >
> > Any help would be much appreciated.
Graham Mayor - 10 Oct 2007 08:38 GMT
Unfortunately you cannot use number switches on text fields and there is no
way to extract part of a text field using fields. You need to change the
type of data source field to a number field. How readily this can be
achieved would be determined by your data application.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

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

> Hi Graham,
>
[quoted text clipped - 58 lines]
>>>
>>> Any help would be much appreciated.
Peter Jamieson - 10 Oct 2007 09:05 GMT
Which database are you using? Which version of Word?

Signature

Peter Jamieson
http://tips.pjmsn.me.uk

> Hi Graham,
>
[quoted text clipped - 58 lines]
>> >
>> > Any help would be much appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.