Skip to main content
Participant
August 29, 2016
Question

Batch update multiple TOCs in a book

  • August 29, 2016
  • 1 reply
  • 1370 views

Hi everyone,

I have a book with 7 documents each containing their seperate TOC. To open each document everytime, I have done changes to the book, to update each TOC in regards to page number and headers, is quite time consuming.

Therefore, I am looking for a script that could help batch update all of my TOCs in the book.

I am new to InDesign Scripting and I have been searching the forum and www for an answer to my question without results. Hence, I hope there is someone who can help confirm or reject that this is possible through scripting.

Thanks in advance!

This topic has been closed for replies.

1 reply

Kai Rübsamen
Participating Frequently
August 29, 2016

If I search the forum, I find a lot of useful posts … e.g.:

Trouble updating TOC with Javascript

Re: What is the code for updating a table of content?

Re: Update several TOCs in the same doc. …

I’m sure, you will find also some lines, how to loop through all documents in a book and include the above mentioned parts.

Kai

kro1Author
Participant
August 29, 2016

Hi Kai,

Yes, the listed discussions/scripts do have something to do with updating a TOC or multiple TOCs in a document. However, I am looking for a script that can do this across a book and not just within one document.


So to simplify: does there exists a script to update multiple TOCs across a book?

Thank you in advance!

Kai Rübsamen
Participating Frequently
August 29, 2016

Obviously there doesn’t exist such a script, otherwise you would have found it.

You said, "I am new to InDesign Scripting". This assumes that you are tryin’ to learn scripting and not only to use final scripts.

So here you find some thoughts on how to open all documents in a book:

Re: How to turn on smart text reflow for all documents in a book?

It should be not so complicated, to change the lines and include the update of the toc.