Wrong page number in table of contens after UpdateFields

Hi there,

I’m using Aspose.Words for .NET in version 17.10 and I stumpled on this issue concerning the page numbers in the table of contents.

The attached file was created by merging serveral word documents into each other and applying some mail merge operations.

Now, all I do is open the file, call UpdateFields() and save it.

using (var s = new MemoryStream(pathToFile))
{
    var d = new Document(s);
                            
    d.UpdateFields();

    d.Save("result.docx", (SaveFormat)d.OriginalLoadFormat);
}

Unfortunately, the page numbers in result.docx are not correct!

The second attached file was created by opening the first file in ms word and saving it unter a new name. If I run the same code on this file, the table of content is correct!

So, either I am making some mistake creating the document and it is missing some important parts, or there is an issue with the UpdateFields method.

Either way, I’m looking forward to reading your thoughts on this

files.zip (60.5 KB)

@pmischo

Thanks for your inquiry. We have tested the scenario and noticed the reported issue. We have logged a ticket WORDSNET-16033 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

We are sorry for the inconvenience.