Update Multiple/All Table of Contents at once?

Learn / Forums / General InDesign Topics / Update Multiple/All Table of Contents at once?

Viewing 6 reply threads
  • Author
    • #94869
      Adam Neal

      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?

    • #94875

      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);


      • #94879
        Adam Neal

        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.

      • #94882

        Hi Adam, there are also some improvements possible. You can mail me directly at forum@ruebiarts.de

    • #94876


      Totally right!

      Personally, as you know, only one-line script for free!

      (^/) ;-)

    • #94883

      If you wanna update “all” the TOCs, use this:

      for (var i = 0; i < nTocStyles; i++) {


    • #100394

      does this update All TOC’s in an entire Book-file?

    • #100395

      No, it updates all TOCs in one document.

    • #14323611
      Kelly Vaughn

      Thank you Kai! That was exactly what I needed today. Thanks for posting the script.

Viewing 6 reply threads
  • You must be logged in to reply to this topic.