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
Peter Jamieson - 21 Mar 2005 19:23 GMT
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
> 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
ALJ - 21 Mar 2005 19:33 GMT
Thanks Peter, that did it!
> 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