Question
CS3 Javascript - finding the paragraph which contain the index page reference
Hi,
I've been trying to cook a script which has the following function:
It gets a topic's page reference, and return the index in the story of the paragraph which contains the source text. I figured the line should look something like that (i made it specific for the example):
myParagraphIndex = app.activeDocument.indexes.item(0).topics.item(0).pageReferences.item(0).sourceText.parent.index;
The problem is, that this line return the index of the parent story.
How can I get the index of the containing paragraph??
Thanks,
Ola
I've been trying to cook a script which has the following function:
It gets a topic's page reference, and return the index in the story of the paragraph which contains the source text. I figured the line should look something like that (i made it specific for the example):
myParagraphIndex = app.activeDocument.indexes.item(0).topics.item(0).pageReferences.item(0).sourceText.parent.index;
The problem is, that this line return the index of the parent story.
How can I get the index of the containing paragraph??
Thanks,
Ola
