2 Replies Latest reply on Jan 2, 2009 1:14 PM by (Eric_Christensen)

    creating TOC from a Book file

      I am new to scripting and have so far been able to muddle my way through what I want to do, but heres one I cant figure out or find any examples of.

      I am trying to create a table of contents from a Book file in InDesign CS3 using JavaScript.

      I have been able to get the script to create a TOC style named tocStyle.

      Here is how I try to generate the TOC:

      myBook = File.openDialog();
      myBook = String (myBook);
      myTOCStyle = app.activeDocument.tocStyles.itemByName("tocStyle");
      app.activeDocument.createTOC(myTOCStyle, true, myBook, [42, 123], true);

      This generates a TOC, but only from the active document and not from the other documents in the Book.

      thanks for any help you can provide,