Hi,
I have a query about the Document.UpdateFields method in Aspose.Words. It seems that if you have an empty paragraph after a table of contents field, it updates the format of that paragraph end mark.
Please see the code below and the attached .dot files. In the input file (input.dot) we have a table of contents followed by 3 empty paragraphs. Please note that the paragraph breaks are red, font size 5. After manually updating fields in MS Word, nothing changes (outputManual.dot). However, when using the UpdateFields method, the formatting of the first paragraph break changes to black, font size 11 (outputAspose.dot).
string inputPath = @“D:\input.dot”;
var document = new Document(inputPath);
document.UpdateFields();
document.Save(@“D:\outputAspose.dot”);
Thanks,
Michal
DotFiles.zip (26.5 KB)