Free Support Forum - aspose.com

Document.UpdateFields causes word document to fail to save

Hello,


I’m using Aspose.Words 2011.02.05 to save and load a word document using the following code:

Aspose.Words.License lic = new Aspose.Words.License();
lic.SetLicense(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), “Aspose.Total.lic”));
Aspose.Words.Document doc = new Aspose.Words.Document(@“C:\Test.doc”);
doc.UpdateFields();
doc.Save(@“C:\Test1.doc”);

A document containing form fields fails to save, and this only happens when UpdateFields is called prior to the save. A “stack empty” exception is thrown. If you cannot reproduce I can provide you with the problem document.

Hi

Thanks for your request. Could you please attach your input document here for testing? We will check the issue and provide you more information.

Best regards,

I have sent the document to you via email. Thanks.

Hi

Thank you for additional information. I cannot reproduce the problem on my side. I used the latest version of Aspose.Words for testing. You can download the latest version from here:

http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

Best regards,

Thanks, this worked when using the latest version.