Hello,
I’m using Aspose.Words for .NET (ver. 23.5.0)
I’m having the following issue when I try to generate the Table of Content on adocument that contains revisions.
Revised_document.docx (14.8 KB)
The numbering is wrong when I generate the TOC using Aspose.words
You can see the result here.
TOC_generated_by_Aspose.docx (15.4 KB)
For example:
- the chapter “LOGGING” is located in the 4th page but in the TOC, it says 5th page.
- the chapter "CONCLUSION " is located in the 11th page but in the TOC, it says 12th page.
To generate the Table of Content using Aspose.Words, i use the following line of code :
docBuilder.InsertTableOfContents("\\o \"1-3\" \\h \\z \\u");
I think the code generates the Table of Content using the “All markups” view and not the “Simple markup” view.
When I generate the Table of Content manually in Word, I obtain a table of content with right numbering.
You can see it here
TOC_generated_manually_in_Word.docx (18.8 KB)
Any suggestions ?
Best regards,