2 Replies Latest reply on Sep 25, 2012 2:49 AM by loulou2003

    Unthread text frames indesign

    loulou2003 Level 1

      hi

      i develop an indesign extension with CS extension builder 2 and flashbuilder 4.6.

      how to unthread text frames ? i don't find any method or property in textframe class...

      thanks

      Simon

        • 1. Re: Unthread text frames indesign
          emerasoft.srl Level 1

          The property you should have to look for is "nextTextFrame"; set it to "null".

           

          Best,

          Luca

          • 2. Re: Unthread text frames indesign
            loulou2003 Level 1

            hi

            thanks for your reply but it doesn't work because i want to keep the text in all textframe. I found a solution in 2 time duplic and remove :

            function unstory(qui:Document){

             

              for each(var stori in qui.stories){

               if(stori.textContainers.length>1){

              duplic(stori);

              remov(stori);

              }

            }

            }

             

            function duplic(myStory){

                                          var myTextFrame;

                                          //Duplicate each text frame in the story.

                                          for(var myCounter = myStory.textContainers.length-1; myCounter >= 0; myCounter --){

                                                    myTextFrame = myStory.textContainers[myCounter];

                                                    myTextFrame.duplicate();

                                          }

                                }

            function remov(myStory){

                                          //Remove each text frame in the story. Iterate backwards to avoid invalid references.

                                          for(var myCounter = myStory.textContainers.length-1; myCounter >= 0; myCounter --){

                                                    myStory.textContainers[myCounter].remove();

                                          }

                                }