10 Replies Latest reply on Sep 6, 2011 6:51 AM by csm_phil

    Waiting for autoflow to finish.

    Vintage-uk Adobe Employee



      I have a simple script that places an ICML file into a textframe and then saves the document.


      The target document is set to autoflow the ICML content, and it creates new pages as needed. This works fine.


      However the save operation does not wait for the autoflow to complete. So the saved document only has one page with overset text.

      It should have 2 pages and no overset text.

      If I leave the page open in InDesign, after a very short delay, a new page is added and the text is autoflowed.


      How can I get InDesign to wait for the autoflow operation to finish before saving the file?




              var myDocument = app.activeDocument;
              var myPage = myDocument.pages.item(0);
              var myTextFrame = myPage.textFrames.itemByName("mainBody");