Round numbers to 2 decimal places when using Word Mail Merge

A

ALJ

How can I limit a mergefield to 2 decimal places using Mail Merge. I am
connected to an Access query that is set up to limit results to 2 decimal
places but it doesn't appear the same in the merged Word Doc. Is there a
switch to accomplish this task or does anyone know of a way I can set the
field up? Thanks!
Andy
 
P

Peter Jamieson

You can try using a numeric formatting switch in Word, e.g. use Alt-F9 to
reveal the appropriate field code and change e.g.

{ MERGEFIELD mynumber }

to

{ MERGEFIELD mynumber \#"0.00" }

- have a look at Word help for other types of formatting you can apply.

You need to check that this does the correct kind of "limit"ing, i.e. if you
want rounding, make sure it does rounding; if you want truncation, make sure
it does that. If it doesn't do the thing you need you may need to change the
way you are limiting the decimal places in your query (and there can be
additional problems if the number comes from a field of type currency).

Peter Jamieson
 

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