Article View: adobe.scripting.indesign
Article #2388creating TOC from a Book file
From: Eric_Christensen
Date: Fri, 02 Jan 2009 20:07
Date: Fri, 02 Jan 2009 20:07
17 lines
1263 bytes
1263 bytes
I am new to scripting and have so far been able to muddle my way through what I want to do, but here�s one I can�t 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,
Eric
Technical Details
Message-ID:
<59b7692a.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,ee2d4738f24ddaea,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII From: Eric_Christensen@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: creating TOC from a Book file Message-ID: <59b7692a.-1@webcrossing.la2eafNXanI> Date: Fri, 2 Jan 2009 12:07:10 -0800 Lines: 23 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit