Hi,
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)
Code:
var doc = new Document(@“test.docx”);
doc.UpdateFields();
doc.Save(@“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,