2 Replies Latest reply on Aug 28, 2008 11:30 PM by (Olav_Kvern)

    Flow Text VB

    Dave Pepper
      Is there a way to flow overset text from one text box to another using a script?
        • 1. Re: Flow Text VB
          Peter Kahrel Adobe Community Professional & MVP
          There's a JS version here: http://www.adobeforums.com/webx/.3c06179c/1

          It shouldn't be tto hard to translate that into VB (though I can't do it!).

          • 2. Re: Flow Text VB
            Level 1
            Hi David, Peter,

            VBScript version of Peter's JavaScript (thanks, Peter!):

            Set myInDesign = CreateObject("InDesign.Application.CS3")
            flow myInDesign.Documents.Item(1)
            Function flow (doc)
                m = doc.pages.item(1).marginPreferences
                gbounds = Array(m.top, m.left,doc.documentPreferences.pageHeight - m.bottom, doc.documentPreferences.pageWidth - m.right)
                doc.viewPreferences.rulerOrigin = idRulerOrigin.idPageOrigin
                Do while doc.pages.item(-1).textFrames.item(1).overflows = true
                   Set tf = doc.pages.add().textFrames.add
                   tf.geometricBounds = gbounds
                   tf.previousTextFrame = doc.pages.item(-2).textFrames.item(1)
            End Function

            That'll probably do it.