9 Replies Latest reply on May 17, 2009 6:58 PM by eboda_snaf

    [CS2-VBS] Order of selected text boxes

    John Galvin



      I'm using the following code:


          For i = 1 To myInDesign.Selection.Count
            rem myIndesign.Selection(1).contents.Export idExportFormat.idTextType, "d:/test.txt"
            rem msgbox myIndesign.Selection(i).Contents
            Buff = Buff & myIndesign.Selection(i).Contents

      This is in order to return the contents of one or more text boxes currently selected.

      The problem is that the order of the textboxes is arbitrary, or more likely based on the

      order that they were created initially.

      I would like to get the contents in the order that they were selected on the page, so the first

      text box clicked provides the first characters in Buff string and so on.