3 Replies Latest reply on Nov 24, 2009 5:57 AM by Ken Krugh

    Reference only part of a story?

    Ken Krugh Level 1

      Hi Guys,


      In VB I've used the following to be able to search from the cursor to the end of a story.


              Set SChar = Ind.Selection(1).ParentStory.Characters(Ind.Selection(1).InsertionPoints(-1).Index)
              Set EChar = Ind.Selection(1).ParentStory.Characters(-1)
              Set SrchTxt = Ind.Selection(1).ParentStory.Texts.ItemByRange(SChar, EChar)

      I was assuming I would be able to also iterate through SrchTxt.Paragraphs but whatever type of object SrchTxt ends up being it doesn't have "Paragraphs" as a property.


      I want to interate through part of the story by paragraph and based on certain criteria, one of them being the style applied to the paragraph, stop so the user can take action.


      How do I reference only part of a story, or figure out in which paragraph within a story the cursor is planted when the script starts?


      Thanks very much,