Table of Contents

82 views
Skip to first unread message

Joost Dopheide

unread,
Nov 9, 2023, 9:27:21 AM11/9/23
to Google Apps Script Community
Hi everyone,

Is it true that it is not possible yet to update (refresh) your Table of Contents in a Google Docs today, nor build it from scratch?

Looking at the documentation it seems there is no way to refresh, nor delete + build from scratch. I also found this issue, and it seems that the functionality is not supported.

Reason why I am checking to be sure, is because ChatGPT provided me with a piece of code to do this (it didn't work, so that supports the believe it does not exist), the issue is was created almost 10years ago, combined with the fact that it seems like an obvious feature to support (apologies for the bluntness).

Reason why I want to do it programmatically instead of through clicking the button in Google Docs itself, is because I want to generate a PDF from the docs, that is automatically shared with the required audience.

Please let me know if you have any ideas to (re)generate the ToC programmatically.

Thanks!

Reply all
Reply to author
Forward
0 new messages