29 Replies Latest reply on Feb 1, 2009 9:46 AM by Br. SCUBILION

    CS3 Javascript - finding the paragraph which contain the index page reference

    Ola K
      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.paren t.index;

      The problem is, that this line return the index of the parent story.

      How can I get the index of the containing paragraph??