View Single Post
  #2   Report Post  
Posted to microsoft.public.word.formatting.longdocs
Cindy M -WordMVP-
 
Posts: n/a
Default Word XP decreasing decmials in calc

In Word XP (SP3 - latest securty, W-XP SP2, 1.4GHz, Latitude D600),
I've mailmerged somce values from Access XP. The merge numbers are ok
(formatted Single with 10 decimal places in Access).

I'm not quite clear on where all these numbers and equations are. The
original values are coming in from Access, as separate merge fields, I
take it. so the equation would actually be like this?
{ = { Mergefield 1} * .45 + { Mergefield 2 } * .2 } 'etc

What's this: {bookmark \# "#,###.#####"} ? There's no such thing as a
"bookmark" field. And bookmarks are risky things during a mail merge.
Have you put a bookmark around the equation and are referencing that?

Are you sure the numbers in the second example are truly coming in with
all decimal places? Just because they do in one record doesn't mean they
will in another...

My recommendation would be to make these calculations in an Access
query, which you use as the data source. Access will calculate much more
quickly and accurately than Word. To "create a field" in an Access
query, you place an "expression" in an empty query column. For example:

total: Field1*.45 + Field2*.2 'etc.

The "total" field will appear in the dynaset result and be available in
Word's mergefield list.

When performing a simple calc (division), Word is displaying the right
number of decimal places. The equation looks like:
=1.02154*.45 + 1.104*.2 + 1.01613*.1 + 1.04167*.25
The 5 decimal place numbers are all calculated (from mailmerge values)
and formated as:
{bookmark \# "#,###.#####"}
When performing the next calculation, Word seem to be losing one
decimal place for each new figure in the equation.
Should be:
=.45965 + .2208 + .10161 + .26042 (.2208 is only 4 places anyhow)
Word is returning (this is with formatting as {bookmark \#
"#,###.#####"}):
=.45965 + .2208 + .101 + .26
If I changed the format (for the last component) to {bookmark \#
"#,##0.00000"}, Word returns:
=.45965 + .2208 + .101 + .26000


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)