Link to home
Start Free TrialLog in
Avatar of Imran H
Imran H

asked on

MS Word Merge field formula calculation using OpenXML

Can the MS Word Merge field formula be calculated using OpenXML

Thanks
Imran
Avatar of A Q Choudary
A Q Choudary
Flag of India image

You have three basic options:

1. Instruct the user to update fields manually by pressing Ctrl+A, F9

2. Set the "Dirty" property of the FieldChar object to True. This will inform Word when it opens the document that the field code should be updated. Word will display a message to the user, asking if it's allowed to update the field code.

3. Before passing the document to the user, process it using Word Automation Services to update the "dirty" field codes. (More about the Automation Service at http://blogs.office.com/b/microsoft-word/archive/2012/09/26/what-s-new-in-word-automation-services.aspx).

4. Perform the calculation yourself, as part of the Open XML code, and insert the result into the document.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.