Aspose.Words.Document.Range.UpdateFields()

Hello,
How can I update the formula fields automatically?
This is my code snippet,

Aspose.Words.Document wordDocument = new Aspose.Words.Document("c:\\temp\\Testing formulas.doc");
wordDocument.Range.Replace("", "20", false, false);
wordDocument.Range.UpdateFields();
wordDocument.Save("c:\\temp\\Testing formulas - merged.doc");

Attached are the input file (Testing Formulas.doc) and the output file (Testing formulas - merged.doc).
Is there something I’m doing wrong? Do you have a feature like Document.Fields.Update from MS Word Automation? I thought that Aspose.Words.Document.Range.UpdateFields() will do it…
Thanks,
Juno

UpdateFields at the moment updates the results of DOCPROPERTY and DOCVARIABLE fields only. To calculate fields in Word document you need to open it in MS Word and press ALT-F9.

Hello,
Our application is running on a server environment and it is intended to deliver word documents with the formula fields updated without user intervention. Do you have any plans to support the automatic calculation of fields any time soon?
Thanks,
Juno

Yes, we plan adding automatic calculation of fields but there is no time frame yet.

This feature is critical for our application. Can you give us an estimate date for the implementation?
Thanks,
Juno

6 months is our best estimate at the moment.

This is very critical to our application as well. Is there any update on this feature. Could you please provide an estimated date for completion?
Thanks,
Mark Whitbeck

Hi
Thanks for your request. Unfortunately, this problem is unresolved yet. Also see FAQ.
Best regards.

Is there any update on this feature? We are currently in need of this feature to handle one of the business requirements.

Thanks
-Balaji

Same here - not sure if it’s the same issue, but I’ve got a document with the Filename field in it - when I do a merge, this value stays as the template name - not the merged file name.
Will post a new topic about my issue - but would be cool if UpdateFields did maybe the real basics?

Hi

Thanks for your inquiry. The current version of Aspose.Words is still able to update only DOCPROPERTY and DOCVARIABLE fields. However, we are working on field evaluation engine at the moment. I will notify you as soon as there is progress regarding this issue.
Best regards.

The issues you have found earlier (filed as 126) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(24)

Hi,
We are getting an error “!Undefined Bookmark” when we are using UpdateFields() method. If the formula cell contains the $ sign then it is throwing this error in the output document otherwise it is working fine.
Please see the below code which we are using to replace the smart tags.

Aspose.Words.Document doc = new Document("c:\\in.doc");
doc.Range.Replace("<<Address Line1>>", "Address Line 1", false, false);
doc.Range.Replace("<<City>>", "City", false, false);
doc.Range.Replace("<<State>>","state",false,false);
doc.Range.Replace("<<Zip Code>>","12345",false,false);
doc.Range.Replace("<<Sale Price>>", "10000", false, false);
doc.Range.UpdateFields();
doc.Save("c:\\out.doc", Aspose.Words.SaveFormat.Doc);

Please find the attached zip file contains sample document and generated output document. Please look in to the issue let me know the fix.
Thanks,
-Balaji

Hi

Thank you for reporting this problem to us. I managed to reproduce it on my side. You will be notified as soon as it is resolved.
Best regards.

Hi,
Merry Christmas to Aspose Team!!!
How are you doing?
Any update on this issue?
Thanks

Hi

Thanks for your request. Unfortunately, the issue is still unresolved. You will be notified as soon as it is fixed.

Merry Christmas

Hi,
Very Happy New Year to Aspose Words Team!!!
Do you have any ETA on this one? Our app is going live by end of this month and we would like to know whether we could the fix before it.
Thanks

Hi

Thanks for your request. Please expect a reply before the next hotfix (with in 4-5 weeks). We might just fix the problem by then or provide you more information.
Best regards.

I have tested the new released Words version 8.1.
Previously I used to get “!Undefined Bookmark”, but now the code is not even calculating…
thanks

Hi

Thanks for your inquiry. Unfortunately, the issue is still unresolved. Please expect a reply before next hotfix (within 4-5 weeks). We might just fix the problem or provide you more information.
Best regards,