Update Multiple/All Table of Contents at once?
- This topic has 8 replies, 5 voices, and was last updated 4 years, 4 months ago by .
- You must be logged in to reply to this topic.
Learn / Forums / General InDesign Topics / Update Multiple/All Table of Contents at once?
Learn / Forums / General InDesign Topics / Update Multiple/All Table of Contents at once?
Tagged: book, chapters, table of contents
Hello everyone,
I am working on a cookbook for a client and we are in the the early stages. I have set up a document (not a book file) with multiple chapters with their own table of contents and have a main table of contents at the front of the book and everything works well. We may be moving recipes around and adding more as time goes on. Is there a way to update multiple or all table of contents at once without selecting each one to update?
Hi Adam,
this is possible, but only via scripting. Please note, that I (and others) usually provide no free scripts. Because this is a short one, I make an exception.
This will update every toc in your document:
(function() { var curDoc = app.activeDocument, tocStyles = curDoc.tocStyles, nTocStyles = tocStyles.length; for (var i = 1; i < nTocStyles; i++) { curDoc.createTOC(tocStyles[i], true); } })();
Kai
Hello Kai,
That worked perfectly!! Thank you so much for your help! I really appreciate it!
Let me know where I can make a donation and I am happy to pay for your time.
Hi Adam, there are also some improvements possible. You can mail me directly at [email protected]
Kai,
Totally right!
Personally, as you know, only one-line script for free!
(^/) ;-)
If you wanna update “all” the TOCs, use this:
…
for (var i = 0; i < nTocStyles; i++) {
…
(^/)
does this update All TOC’s in an entire Book-file?
No, it updates all TOCs in one document.
Thank you Kai! That was exactly what I needed today. Thanks for posting the script.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies allows us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
You have to be logged in to save.
Not a member? Join Today - it's FREE!