PAGEREF fields in 365 Word

%3CLINGO-SUB%20id%3D%22lingo-sub-2888277%22%20slang%3D%22en-US%22%3EPAGEREF%20fields%20in%20365%20Word%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2888277%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20there!%20I'm%20generating%20a%20docx%20from%20code%2C%20and%20trying%20to%20implement%20my%20own%20sort%20of%20%22Table%20of%20Contents%22%20because%20it's%20a%20long%20document%20and%20we%20have%20specific%20needs%20on%20what%20to%20show%20and%20what%20to%20omit%20in%20the%20ToC.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20issue%20I'm%20running%20into%20is%20that%20PAGEREF%20fields%20don't%20seem%20to%20work%20at%20all%20in%20365%20word%2C%20and%20only%20show%20%221%22%20in%20desktop%20word%2C%20even%20when%20Automatically%20Update%20Fields%20setting%20is%20turned%20on%20(w%3AupdateFields).%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20ideas%20on%20how%20to%20go%20about%20this%20via%20plain%20OOXML%3F%20I%20need%20to%20get%20the%20page%20numbers%20in%20there%20on%20my%20custom%20table%20of%20contents.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2888277%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWord%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWord%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWord%20Document%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

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.

0 Replies