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

Free Support Forum - aspose.com

Using V9.0 DLL but not generating the table contents numbers?

release notes says it should generate numbers also


Thanks for your request. When you call the Document.UpdateFields method, Aspose.Words updates (entirely rebuilds) the TOC field, but does not insert page numbers into the TOC field yet. Aspose.Words calculates correct page numbers and inserts into the TOC when the document layout is built e.g. when you save to PDF or print. So to update page numbers in TOC, you should call Document.UpdatePageLayout or just save document in PDF or XPS.

Document doc = new Document(@"Test001\TestTOC.doc");

Best regards.