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.

Mon Sep 04, 2017 12:42 am

I use "Add, Count, Retrieve and Remove Variables in a Word document Using C#" method could add some docvariables and set zhe value.but when I changed zhe value of the variable, zhe range field witch related the variable couldn't change .I think there should be a update manipulate to simulate "F9" function.Then my question is how to update range field by using Spire.Doc?

zhangsir58
 
Posts: 3
Joined: Wed Aug 30, 2017 8:20 am

Mon Sep 04, 2017 6:49 am

Dear zhangsir58,

Thanks for your inquiry.
Please try to use following code.
Code: Select all
document.IsUpdateFields = true;

If there is still issue, please provide the input document and the code you were using so that we could investigate it further.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Sep 05, 2017 9:29 am

Dear zhangsir58,

Did you test the code I provided ? Did it help you solve the issue ?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Sep 07, 2017 1:41 am

thank you for your reply.it's not work for me by only added this method.I attached my doc.It has a docvariable named "A1",and I add a docvaiable field in zhe page to relate zhe variable.At the beginning,zhe variable "A!" value is "12",and in zhe page it shows "12".when i use "Add, Count, Retrieve and Remove Variables in a Word document Using C#" method to change zhe value of "A1" to "13",I checked that value has changed to "13" ,but zhe page still shows "12".please help me.

zhangsir58
 
Posts: 3
Joined: Wed Aug 30, 2017 8:20 am

Thu Sep 07, 2017 3:22 am

Dear zhangsir58,

Thanks for your feedback.
I have noticed the issue and posted it to our Dev team. We will let you know when there is any progress.
Moreover, we found the issue was caused by the double quotation marks you imported with Chinese mode. And if you import it in English mode, it would work.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Sep 07, 2017 6:46 am

Thanks a lot.Just as you said,when I changed zhem in english mode,It works!

zhangsir58
 
Posts: 3
Joined: Wed Aug 30, 2017 8:20 am

Thu Sep 07, 2017 6:52 am

Dear zhangsir58,

Thanks for your feedback.
We will also inform you when the issue is fixed. If there is any question, welcome to get it back to us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.Doc