Free Support Forum - aspose.com

Exception - Aspose.Words.Range.UpdateFields

Hi,

We're getting the following error when UpdateFields is called on a document. What I just needed to do is ensure that any date field on the document that is supposed to show current date (or date when document is generated) gets a value. Is there another simpler way to do it aside from using UpdateFields()?

Exception: at xfbd1009a0cbb9842.x82c8201fae256a59.x83bcdf1790545fdb() at Aspose.Words.Fields.Field.x42a25ae95099edb8(x5e36356bc92c609b x0f7b23d1c393aed9) at Aspose.Words.Fields.Field.x295cb4a1df7a5add(x5e36356bc92c609b x0f7b23d1c393aed9) at xfbd1009a0cbb9842.xfedf115fd9c03862.x4e3cfc222c92cda7(Field xe01ae93d9fe5a880, x5e36356bc92c609b x0f7b23d1c393aed9) at xfbd1009a0cbb9842.xfedf115fd9c03862.x4e3cfc222c92cda7(Field xe01ae93d9fe5a880) at xfbd1009a0cbb9842.xbf9ddf72e1283af9.x18dfca7c5fd2402f() at xfbd1009a0cbb9842.xfedf115fd9c03862.xdd6cf0348a23f220(xcf417e2db4fe9ed3 xe00c282e1a49fcfb) at xfbd1009a0cbb9842.xfedf115fd9c03862.x384c03e4298b53bf() at Aspose.Words.Range.UpdateFields() at Aspose.Words.Document.UpdateFields()

Hi Ronaldo,

Thanks for your inquiry. Regarding the exception while using Document.UpdateFields, please attach your input Word document here for testing. I will investigate the issue on my side and provide you more information.
rbuenaflor:
or date when document is generated
Aspose.Words does not update Date fields automatically. However, you can get the document created time by using BuiltInDocumentProperties.CreatedTime property.