Table of Contents not auto-generated or updated in Word Online (Word for the Web)

Nishi Sharma 0 Reputation points
2025-12-28T10:37:10.3866667+00:00

Hi Team,

I am programmatically generating Word (.docx) documents using JavaScript (docx library).

The document contains:

  • Proper Heading styles (Heading 1, Heading 2)
  • A valid Table of Contents field

When I open the document in Microsoft Word Desktop, the TOC works correctly after updating the field.

However, when I open the same document in Word Online (Word for the Web / OneDrive), the Table of Contents does not populate or update.

My questions:

  1. Is auto-generation or updating of Table of Contents fields officially unsupported in Word Online?
  2. Does Word Online currently support updating Word field codes (TOC, REF, etc.)?
  3. Is there any roadmap or planned support for TOC field updates in Word Online?

Please confirm the expected behavior and any official documentation references.

Thanks.


Mod moved from : Windows for home | Windows 11 | Accessibility

Microsoft 365 and Office | Development | Office JavaScript API
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-28T10:37:20.83+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more
    1. Auto-generation or updating of Table of Contents (TOC) fields is not fully supported in Word Online. While you can insert a TOC, the functionality to auto-generate or update it automatically is limited compared to the desktop version.
    2. Word Online does not currently support updating Word field codes such as TOC and REF through the user interface. You can view the TOC, but any updates must be done in the desktop version of Word.
    3. There is no specific roadmap or planned support mentioned for TOC field updates in Word Online at this time. The capabilities of Word Online are generally more limited compared to the desktop app.

    For more detailed information, you can refer to the official documentation regarding features available in Word for the web.


    References:

    0 comments No comments

  2. Carlo Luna 6,840 Reputation points Independent Advisor
    2025-12-28T14:30:37.03+00:00

    Hi Nishi,

    Thanks for reaching out. I understand how frustrating it can be when the Table of Contents doesn’t update as expected in Word Online. I'm here to help!

    First, Word Online supports inserting and viewing a Table of Contents, but it does not automatically generate or update fields like the desktop version does.

    Second, updating field codes such as Table of contents or REF is not currently supported in Word Online, either manually or programmatically.

    Third, there is no official roadmap or announced timeline for adding full TOC update support in Word Online. Microsoft continues to enhance the web experience, but this feature remains exclusive to the desktop version for now.

    Last, as a workaround you can include <w:UpdateFieldsOnOpen val="true"/> in your OpenXML settings so the Table of Contents updates when opened in desktop Word.

    I hope you find this information helpful. Please let me know if you have any further questions If the answer is helpful, please click "Accept Answer".

    Regards,

    Carlo

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.