I have a word document with three FormField's type Regular Text with 'Calculate on Exit' checked.
There is a fourth FormField type Calculation (sum of the other three FormField's). My vb app does put text in three of the fields. I am wondering how to trigger the calculation in the fourth field.
Also when I open the saved document and I tab through the three text FormField's, the fourth FormField box goes away.
This is my vb code:
document.LoadFromFile("C:\AA\FormFieldCalculation.doc")
Using document
For Each field As Fields.FormField In document.Sections(0).Body.FormFields
Select Case field.Name
Case "AMT1"
field.Text = FormatNumber(1.0, 2)
Case "AMT2"
field.Text = FormatNumber(2.0, 2)
Case "AMT3"
field.Text = FormatNumber(3.0, 2)
End Select
Next
document.IsUpdateFields = True
document.SaveToFile( "C:\AA\FormFieldOutput.docx", FileFormat.Docx)
End Using
I updated my FormFieldOutput document to review.
I am using the free version of Spire.doc.
Does anyone have any ideas?