Home » Questions » Computers [ Ask a new question ]

How to embed calculations in MS word

How to embed calculations in MS word

The type of document I have in mind is a bid or a contract. It has many values, such as prices and dates, scattered within the text. For years I have used DOCPROPERTY fields to avoid copying-and-pasting them, where they are the same (e.g. final price may occur 10 or 20 times in a document). But I think this could go even further, as it would be easiest if some values could be calculated from others.

Asked by: Guest | Views: 223
Total answers/comments: 2
bert [Entry]

"Make sure to create proper field codes, one inside the other, like this:

Press CTRL + F9
Put in =*1.07 between the braces
Click between = and *
Press CTRL + F9 again
Put in DOCPROPERTY ""final_price"" between the braces
Press Alt + F9 to toggle field codes
Press F9 to update the field"
bert [Entry]

"After some more searching I arrived at another solution. I haven't been able to make the DOCPROPERTY work, but these steps work:

put the numeric values at the end of your document
bookmark each of them, giving the bookmarks descriptive names
formulas now work with the bookmark names as ""variables""\
make the numeric values invisible (e.g. by setting font color) so they don't appear in print.

I think it would be more elegant to use the DOCPROPERTY if anyone can make it work, since leaving invisible text in your documents is clumsy..."