Mail Merge format

T

Tony

I am doing a merge and have the main doc in word and the
data doc in excel. I am not going to mail out anything
just trying to automate some repetitive entries in the
main doc by merging with the data doc. In the excel data
doc I have several columns that are 2 digit numbers (eg
1.1) and a dollar amount is another column (eg
$1,000,000).

The problem is when I merge to the main doc the 1.1
becomes 1.10000009 and the dollar amount is without the
dollar sign and commas. I have tried all kinds of things
to format the word doc and my excel data doc but cant
seem to get it to format correctly. Hope someone knows...

Thank you,
Tony
 
S

Suzanne S. Barnhill

If this is Word 2002 or above, the default connection to Excel is via OLEDB,
which doesn't preserve the number formatting. You have two options:

1. You can connect via DDE instead, which will preserve the formatting (for
information on this, see
http://homepage.swissonline.ch/cindymeister/MM2002/MM2002.htm).

2. You can add a "numeric picture switch" to the mail merge field. For more
on this, see "Numeric Picture (\#) field switch" in Word's Help.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
T

Tony

Graham,

Thank you. That was exactly what I was looking for. Now,
I just have to figure out how to make it work as I am not
that familiar with switches. Your website is "the bomb".

tony
 
T

Tony

Graham,

All of it worked except one thing. In my excel file that
is db for merging into word, I have a column that is 1.65
(not as a percent but would like to know if I do have it
as a percent would it make a diff. in the merge) and when
it imports it is 1.6499999999999999. I tried to truncate
it but no success. I did get it to $1.65 but of course
it is a percent so I could not use it and I tried to edit
the code but I could not get it to drop the dollar sign
and keep it as 1.65. I am not too familiar with the
switches but all the other ones worked (converting to
dollars).

The format that I have in word now is
MERGEFIELD Pricing_ [ ={MERGEFIELD Pricing_} *100\\#0%
\\# 0.0 ] and this was from your website.

Thank you
 
T

tony

Thank you...it worked perfectly!
tony
-----Original Message-----
If this is Word 2002 or above, the default connection to Excel is via OLEDB,
which doesn't preserve the number formatting. You have two options:

1. You can connect via DDE instead, which will preserve the formatting (for
information on this, see
http://homepage.swissonline.ch/cindymeister/MM2002/MM2002 ..htm).

2. You can add a "numeric picture switch" to the mail merge field. For more
on this, see "Numeric Picture (\#) field switch" in Word's Help.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.



.
 
G

Graham Mayor

To get it to read 1.65, omit the $ sign from the switch that you used to get
it to read $1.65
\# ",0.00" should do the trick

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Graham,

All of it worked except one thing. In my excel file that
is db for merging into word, I have a column that is 1.65
(not as a percent but would like to know if I do have it
as a percent would it make a diff. in the merge) and when
it imports it is 1.6499999999999999. I tried to truncate
it but no success. I did get it to $1.65 but of course
it is a percent so I could not use it and I tried to edit
the code but I could not get it to drop the dollar sign
and keep it as 1.65. I am not too familiar with the
switches but all the other ones worked (converting to
dollars).

The format that I have in word now is
MERGEFIELD Pricing_ [ ={MERGEFIELD Pricing_} *100\\#0%
\\# 0.0 ] and this was from your website.

Thank you
-----Original Message-----
See http://www.gmayor.com/formatting_word_fields.htm

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>





.
 

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

Similar Threads


Top