Table of Contents Page Numbers do not Match Actual Page Numbers in Document
Exporting certain Confluence content can lead to a Table of Contents (ToC) that references incorrect page numbers or page numbers that do not exist. This inconsistent numbering behaviour can also occur for any kind of numbered reference (ie. see page X).
The reason for this behaviour is due to the defined template fonts not being available. Specifically, the chosen fonts in the Word file template are not found on the system and a backup font is used in the generated Word document. Using a fallback font leads to an inconsistency with the page numbering because of the font-metric differences between the defined font and the fallback font (eg. difference between font character width and/or spacing between characters). This inevitably leads to some paragraphs either being shorter or longer and causing other elements, like images, to get moved to different pages. Subsequently, the expected page numbering for the Table of Contents differs to the actual page numbering in the document.
Make sure that the defined font is available in the generated exports by ensuring that the server you are running Confluence on has the required fonts installed. Alternatively, it remains possible to embed the required font in your Word file template - please see Microsoft's documentation to learn more about how to embed fonts in MS Word files on your operating system.
Need a quick fix for the ToC numbering?
To fix the incorrect numbering in your Word document, right click the Table of Contents and select "Update Field". After this the numbering for the Table of Contents will be updated correctly in the document.