We encounter issues for page references in TOC - we tried to figure out which part of the document is causing the problem but we couldn't solve it.
The document is built with MS Word doc used as template. After composing the document with the TOC; page numbers shows in the TOC do not align with real page numbers. If we update the TOC field using MS Word (right-click on TOC, select update field, only page numbers), after that we tried to get the output in C#, again the page numbers are irrelevant in the TOC.
We are using the TOC as like below format.
TABLE OF CONTENTS
SCOPE OF WORK 6
AREA DATA 8
SITE DATA 11
IMPROVEMENT DATA 15
CONDITIONS 17
QUALITY 25
Note : Few Page numbers are correct and few are not correct.
we have used the "document.UpdateTableOfContents()" in C# code. Can you please suggest if anything we missed to add in the C# or template side.