Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Jun 21, 2018 9:16 pm

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?
Last edited by kfranke on Mon Jun 25, 2018 2:53 pm, edited 1 time in total.

kfranke
 
Posts: 2
Joined: Thu Jun 21, 2018 8:03 pm

Fri Jun 22, 2018 6:28 am

Hello,

Thank you for your post.
Could you please share your sample document("FormFieldCalculation.doc") as well as the expected output to help us look into the issue?

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Mon Jun 25, 2018 2:54 pm

I have attached the documents to my original post.

kfranke
 
Posts: 2
Joined: Thu Jun 21, 2018 8:03 pm

Tue Jun 26, 2018 3:22 am

Hello,

Thank you for your response.
I have noticed the issue and referred it to our dev team.
Once there's any update, I will let you know.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.Doc