> But here's the rub: how do you work out which story has just been updated? If a TOC has just been created for the first time, it's easy because the story is the last in the document's collection, but if it has merely been updated, then the story stays in the same place in the collection.
>
>
Huh? Am I missing something? If you update a TOC, the story must be
selected, so just find the story of the current selection...
> And so if a document has more than one TOC, the script can't know which is which (and, for that matter, it can only deduce which are the TOC stories by looking for TOC-related paragraph styles).
There's the story.storyType property. You can check that, to see if it's
a TOC.
--
Harbs
http://www.in-tools.com
... View more