We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Document with 'PlaceHolder Text' style, get corrupted after UpdateFields() using Aspose.Words


When I run UpdateFields() on a Word document which has few headings and paragraph with ‘PlaceHolderText style’, the document behave differently in following 2 cases:

Case 1: If I modify any heading or paragraph, the word document get corrupted after running UpdateFields().
EditedText.PNG (1.3 KB)

Case 2: Whereas if i don’t modify the heading and let the default text as it is, the document works fine after running UpdateFields().
image.PNG (964 Bytes)

var doc = new Document(@“test.docx”);

I’ve attached the test documents and screenshots for your reference:
1.‘TestDefaultPlaceholderText.zip’ which works fine after UpdateField().
TestDefaultPlaceholderText.zip (91.4 KB)
2.‘TestEditedPlaceholderText.zip’ which gives corrupted docuement.
TestEditedPlaceHolderText.zip (92.0 KB)

Could you please take a look?



Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-17438. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

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