File corrupted after using UpdateFields()

Hi,

After using UpdateFields() on a Word document using Aspose.Words, I noticed the file is corrupted.

Code:

Document doc = new Document(@".\test1.docx");
doc.UpdateFields();
doc.Save(@".\out.docx");

It seems that after updating fields, the xml structure of the embedded chart was unexpectedly changed and the Word document cannot be opened again.

I’ve attached my test files for your reference. Could you please help us take a look?

test.zip (230.2 KB)

It would also be very helpful if we could have some workaround to have the fields updated without affecting the chart.

Thanks,

@ServerSide527

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-21712. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-21712) have been fixed in this Aspose.Words for .NET 21.3 update and this Aspose.Words for Java 21.3 update.