update TOC in word document automatically online

Renjeesh R 60 Reputation points
2025-03-26T07:20:07.4233333+00:00

Hi All,

I need to format the table of contents (TOC) in multiple Word documents daily. I'm using Power Automate with OpenXML (C#) to add the TOC. However, the code is inserting a TOC but not update it automatically, as shown in the attached image.

The main requirement is:

If a TOC already exists, it should be updated.

If no TOC is present, it should be inserted.

Note: The solution must work online only.

Is there any other approach to achieve this?

Thanks,

Renjeesh.

SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
662 questions
0 comments No comments
{count} votes

Accepted answer
  1. AllenXu-MSFT 24,911 Reputation points Microsoft External Staff
    2025-03-26T08:10:49.1366667+00:00

    Hi @Renjeesh R,

    Power Automate is not supported on Microsoft Q&A. The product group for Power automate actively monitors questions in dedicated forums here.

    https://community.powerplatform.com/forums/thread/?groupid=46ce02a3-e1a7-4176-81fc-d93a4001d287


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

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