Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
John John is offline
external usenet poster
 
Posts: 307
Default Merge field+if statement+phone numbers

I have a form file in Word 2000 that merges with an Excel Database. One of
my fields is a telephone number.

I want to do two things with that telephone number. One format as (000)
000-0000 and if that Excel telephone field is blank when the merge takes
place, I do not want the telephone number to print at all. I want the field
to appear blank on the final merged document. However, if there is a
telephone number in that field then I want the telephone number to print in
the format shown above.

I have tried several versions of an if statement and cannot seem to obtain
the correct statement.

Here is what I have tried:

{IF{MERGEFIELD EmployerPhone}"""{MERGEFIELD EmployerPhone}"}

Also tried:

{IF{MERGEFIELD EmployerPhone\#"(000)'-'000'-'0000"}"""{MERGEFIELD
EmployerPhone\#"(000)'-'000'-'0000"}"}

and also:

{MERGEFIELD EmployerPhone\#"(000)'-'000'-'0000"}{IF{MERGEFIELD
EmployerPhone\#"(000)'-'000'-'0000"}"""{MERGEFIELD
EmployerPhone\#"(000)'-'000'-'0000"}"}

What am I doing wrong. I have tried merging with files that contain
telephone numbers and are blank. My results are not consistent. I can get
it to print in the format I want depending on the above statement variation,
but not consistently blank when the field is blank and not consistently print
the phone number when the filed is not blank.

Help!!!

AJ

--
John R.
 
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
How do I format a phone number in a mail merge field? Halley Mailmerge 12 April 25th 23 08:54 PM
Word: IF statement to merge a field only if another Field is popul HelenC Mailmerge 3 August 24th 06 10:33 AM
how do I get phone numbers to format correctly in a mail merge? schroederv Mailmerge 1 July 14th 06 03:04 AM
Troubleshoot using field switching to format phone numbers in Word Halley Mailmerge 4 June 29th 05 06:19 PM
Home Phone field not getting picked up in Merge Cathleen McGuire Mailmerge 4 January 7th 05 03:13 AM


All times are GMT +1. The time now is 05:43 AM.

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"