mergeformat

L

Laura

please, anybody knows how to put one field in a mail merge combination, with
number format?

(ActiveDocument.Fields.Add Range:=Selection.Range, Type:=wdFieldMergeField _
, Text:="""Numero""")

thanks
 
J

Jean-Guy Marcil

Laura was telling us:
Laura nous racontait que :
please, anybody knows how to put one field in a mail merge
combination, with number format?

(ActiveDocument.Fields.Add Range:=Selection.Range,
Type:=wdFieldMergeField _ , Text:="""Numero""")

Try this instead:

ActiveDocument.Fields.Add Selection.Range, wdFieldEmpty, _
"MERGEFIELD ""Numero"" \# ""#0.00""", False

Change "#0.00" to reflect the formatting you want.
And, depending on you regional language as set in the control panel, you may
have to change the "." for a ",".

We usually use "wdFieldEmpty" so that we can control the content of the
field code.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top