Hello there! I'm generating a docx from code, and trying to implement my own sort of "Table of Contents" because it's a long document and we have specific needs on what to show and what to omit in the ToC.
The issue I'm running into is that PAGEREF fields don't seem to work at all in 365 word, and only show "1" in desktop word, even when Automatically Update Fields setting is turned on (w:updateFields).
Any ideas on how to go about this via plain OOXML? I need to get the page numbers in there on my custom table of contents.