5 Replies Latest reply on Mar 28, 2013 7:08 AM by MadMac55

    Find first line in every column

    BEGINNER_X Level 3

      Hi All,





      I want to find first line in every text frame column.





      If the active document contains single column, two column and multiple column text frames. In that case I am not able to get my result



      Trying script:


      var myDoc = app.activeDocument


      var myTextFrames = myDoc.textFrames.everyItem().getElements()


      for(i=0; i<myTextFrames.length; i++)


            var myTextColumns1 = myTextFrames[i].textColumns[1].lines[0].contents




      Herewith i attached the error file.


      If active document contains only two column text frame, script run sucessfully.


      If active document contains single column text frame and two column text frame error found as below:

      Screen Shot 2013-03-27 at 3.31.16 PM.png



      Could anyone find solution for my request.


      Thanks in advance