2 Replies Latest reply on Mar 6, 2013 3:30 AM by rajnikids

    Working on textWraps

    rajnikids Level 1

      Hi Forum,


      Some of the elements (textframes, rectangles, and manually drawned pen tool items) inside the job has "textWrapOptions" applied.


      WHen i ungroup all the item using Script,, the textwrapOptions applied to above elements is relased automatically


      (i.e. TextwrapOptions is automatically Set to none, while ungrouping pageItems using script).


      Can anyone have script for this kind.


      thanks & regards,


        • 1. Re: Working on textWraps
          [Jongware] Most Valuable Participant

          This works for me:


          it = app.selection[0].allPageItems;
          for (j=0; j<it.length; j++)
            it[j].textWrapPreferences.textWrapMode = app.selection[0].textWrapPreferences.textWrapMode;
            it[j].textWrapPreferences.properties = app.selection[0].textWrapPreferences.properties;


          You didn't tell what you already tried, so I had to figure out what didn't work -- and then why not. It seems the trick is to first copy the text wrap mode, to make the other properties "catch on" -- they cannot be set when there is no text wrap mode 'yet'.

          • 2. Re: Working on textWraps
            rajnikids Level 1

            Hi [Jongware] - thanks for your suggestion. Your suggestion.isValid.


            apologise for unclear postings and request from me...


            This is the one Im using to ungroup...


            try {

            var Groups = app.activeDocument.groups;

            while (Groups.length > 0) {



            } catch(e) {}


            So, it ungroup and released all the Textwrap.


            Textwraps method is: a text frame fit side the filled rectangled and then grouped and applied textWrap..


            thank you verymuch [jongware]..