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

Free Support Forum - aspose.com

Table of Contents not correct

Hello,

I am using Aspose.Words 19.3.0.0 to create the attached document. After the document is built a call to UpdateFields() is made. As you can see, the table of contents is incorrect. Figure 1 and 2 are on page 4 whereas the TOC says Figure 1 is on page 3. I have reopened the document using Aspose, called UpdateFields() again but it does not change the page numbers. I can, however, go into Word and call “Update Field” and the pages in the TOC are regenerated correctly. Any help appreciated test (16).zip (3.0 MB)

@optimalosg

We have tested the scenario the latest version of Aspose.Words for .NET 19.3 and have not found the shared issue. We have attached the output DOCX with this post for your kind reference. 19.3.zip (3.0 MB)

I had temporarily commented out my reload/reupdate code. Once I put that back in, it did the trick. Thank you

@optimalosg

It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.