Skip to main content

Notifications

Community site session details

Community site session details

Session Id : vHtUr/vkF3ZX9qE+dc2hx8
Power Automate - Using Flows
Unanswered

update TOC in word document automatically online

Like (1) ShareShare
ReportReport
Posted on 26 Mar 2025 09:56:14 by 16

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.

  • David_MA Profile Picture
    10,930 Super User 2025 Season 1 on 01 May 2025 at 15:06:39
    update TOC in word document automatically online
    I am not sure this will do what you need, but it may give you an idea on how to do what you want. It is for populating a Word document without using the premium populate a Word template action. Based on your description, I don't think using a template would work for what you need. 
     
    Here is the link to the video by @DamoBird365 on YouTube: https://youtu.be/Qj8SIiGJRnc?si=gshM5KnwOiNdTKAb

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Using Flows

#1
stampcoin Profile Picture

stampcoin 24

#2
RP-25090907-0 Profile Picture

RP-25090907-0 23

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 15 Super User 2025 Season 1

Overall leaderboard

Featured topics

Restore a deleted flow
Loading started