1 Reply Latest reply on Dec 24, 2015 3:43 AM by Peter Kahrel

    Automatically moving a text box

    michalkessel Level 1

      I have a text box containing certain text (for example 'hello-hello12'), across several separate documents. I want to move that text box do a different location on the page in all those documents. Is there a way to do it in bulk? I'm not very familiar with scripting but I can try.


        • 1. Re: Automatically moving a text box
          Peter Kahrel Adobe Community Professional & MVP

          - Look for your certain text, e.g.


          app.findTextPreferences = null;
          app.findTextPreferences.findWhat = 'hello-hello12';
          found = app.activeDocument.findText();


          - Each found instance has a parent text frame. Move that frame to the position you want:


          for (i = 0; i < found.length; i++) {
            found[i].parentTextFrames[0].move (['5mm', '10mm']);


          which moves the text frames to the specified position. Two things to watch out for:

          - watch out for the ruler setting: you should probably set the rulers per page (not per spread)

          - overset text has no parent text frame. You could use this workaround:


          found[i].parentStory.textContainers[0].move(. . .)