-
1. Re: Update multiple table of contents script
John Hawkinson Jul 13, 2011 6:24 PM (in response to RichardM0701)As far as I can tell, there is no scripting support for updating a previously-generated Table of Contents.
I suppose you could invoke the menu item, but that's kind of ugly.
Anyone?
-
2. Re: Update multiple table of contents script
RichardM0701 Jul 14, 2011 8:48 AM (in response to John Hawkinson)I wonder, is the TOC a glorified Cross Reference?
-
3. Re: Update multiple table of contents script
John Hawkinson Jul 22, 2011 11:50 PM (in response to John Hawkinson)As far as I can tell, there is no scripting support for updating a previously-generated Table of Contents.
I suppose you could invoke the menu item, but that's kind of ugly.
It turns out I was wrong. At least for my simple test case, invoking createTOC() with the relevant TOCStyle and the replacing parameter set to "true" is sufficient. So therefore:
var i, t = app.activeDocument.tocStyles; for (i=0; i<t.length; i++) { app.activeDocument.createTOC(t[i],true); }(It doesn't seem to like using plural objects, so you can't use .everyItem()...)
-
4. Re: Update multiple table of contents script
[Jongware] Jul 23, 2011 8:06 AM (in response to RichardM0701)RichardM0701 wrote:
I wonder, is the TOC a glorified Cross Reference?
If only ... It's more correct to state the opposite: a TOC is a dumbed-down cross reference that doesn't cross reference anymore -- ever.
All that the TOC function does is scan your document once. Anything smarter that doesn't need constant attention needs to be done manually. (Yes, the contradiction in that statement is fully intentional.)




