3 Replies Latest reply on Aug 12, 2009 2:20 AM by Beliakov

    [CS3-VBA/JS] How to get referense on para with pic

    Beliakov

      i try to get para, previous for para with inline picture

       

      Set mPics = myDoc.Pages(4).PageItems(1).ParentStory.AllGraphics

      For Each mPic In mPics
      Set mPicPara = mPic.Parent.Parent 'para with pic

          Set mPara_1 = mPicPara.ParentStory.Paragraphs.PreviousItem(mPicPara) ' – writes "invalid parametr"

      ...

      Next

       

      by the way:

      Set mPara2 = mPicPara .ParentStory.Paragraphs.NextItem(mPicPara ) 'give reference on whole story
      Set mPara2 = mPicPara .ParentStory.Paragraphs.PreviousItem(mPicPara ) ' again – "invalid parametr"

       

      Where is mistake?

       

      Thanks