Free Support Forum - aspose.com

Formula's

I had a question regarding the updatefields function in the Document.Range. It seems that it doesn’t update the formulas automatically. Is this the expected behavior? After using the updatefields and opening the document in Word, i do not see the formula result but rather i see the actual formula. Using the word automation function Document.Fields.Update it worked perfectly.

When i do a Document.Range.Replace for a document that contains a formula, using the Document.Range.Text does not return the correct value for the formula, but rather it returns a synstax error. The reason this is important is because i need to know when the document has in fact changed via a replace. My current structure does a comparison of the document before and after the replace. Is there a way to achieve this using the Aspose.Word component.

Thanks,
Gus

Hi,

Thank you for considering Aspose.

A method similar to Document.Fields.Update is not yet available but we will surely implement it in the future. You can also attach your document to let us investigate why the syntax error occurs.

Hello,
Do you have a time line for the implementation of the method similar to Document.Fields.Update?
It is possible to return the replacements count in the Document.Range.Replace method?

Thanks,
Juno

The recently released Aspose.Word v3.0 provides the Range.UpdateFields method but at the moment it updates only DOCPROPERTY fields. Fully functional version of this method will be abailable in several months.

Regarding your request to return the replacements count - thank you, we have logged it.

Hi,

We have released Aspose.Word 3.1

  • Range.Replace returns the number of replacements made.
  • Range.UpdateFields now calculates field result for document property and document variable fields.
  • http://www.aspose.com/blogs/Roman.Korchagin/