View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default mail merge field for telephone numbers; what switches?

It sounds as if you did what I suggested, although this makes me a bit
nervous:

I deleted the field code from
the Excel database


....because you should be deleting/replacing the field code /in the Word
document/ and should not need to touch the Excel document.

However, it's obviously not working so let's check a few things:
a. To insert the field in Word, use ctrl-F9 to insert the special field
code braces {} and type

MERGEFIELD yourfieldname \#"000'-'000'-'0000"

between the {}, where the text after the \# is enclosed in "staright double
quotes" -(ASCII (decimal) character 34, the one after "!" in Insert|Symbol),
and the hyphens (hyphen - ASCII decimal 45, the one after "," in Insert
Symbol) are surrounded by "straight single quotes" (ASCII (decimal)
character 39, the one after "&" in Insert Symbol)
b. Does it make any difference if you use the following nested field?

{ = {MERGEFIELD yourfieldname} \#"000'-'000'-'0000" }
c. can you select one of the phone number cells near the to pof the
appropriate column in your Excel sheet and tell us what formatting is appied
(use Format|Cells to find out)?

Peter Jamieson

"AngloAlly" wrote in message
...
Thanks for the help Peter, but it didn't work. I deleted the field code
from
the Excel database and using CTRL+F9 typed in what you gave me. When I
ran
the merge the numbers still came out 0000000000, with no spaces or dashes.
Can you give me specific instructions or link me to a website that does.

"AngloAlly" wrote:

MS OFFICE v. 2002
I would like to format a merge field in a Word mail merge document like
the
telephone number formating in Excel, 3 digits for area code-3 digits
exchange-4 digits number, with the dashes. The data bases I'm using are
either from trade show attendees who swipe badges and the fields are
pre-formatted or if I enter the data the column is formatted in Excel for
telephone numbers so I just enter all 10 digits and it formats itself.
Once
I insert the field code into the document, what switches can be applied
to
have it print out in the merged document like xxx-xxx-xxxx.