0 Replies Latest reply on Jun 10, 2010 8:38 AM by Beliakov

    [cs3-vba] How to chek para lines in diff frames

    Beliakov Level 1

      I need to know, how many lines of para left in previous frame.

       

      For this I do:

      mPara - Paragraph been cheked

       

      cntPag = mPara.Parentetextframes(1).Parent.DocumentOffset

       

      If mPara.ParentTextFrames.Count > 1 Then ' if more then 1 frame occupied

          cntLine = 0 ' counter of lines

             For Each mLine In mPara.Lines
                  If mLine.ParentTextFrames(1).Parent.DocumentOffset = cntPag Then cntLine = cntLine + 1
                  If mLine.ParentTextFrames(1).Parent.DocumentOffset > cntPag Then Exit For
              Next
          End If

       

      'cntLine = smth' - lines in first frame

       

      Is there some shorter way to do this chek?