1 Reply Latest reply on Mar 27, 2010 2:43 AM by Pontus Uggla

    How to duplicate an image frame inside a text frame?

    Pontus Uggla Level 1

      I have a pasted image frame in a text frame in a document and I would now like to duplicate that image frame inside the text frame. I can reach the image frame with myDocument.pageItems[0].pageItems[0]; but when i duplicate it, it ends up some where else on the page.

       

      Is it possible to duplicate it, hopefully without having the document visible?

        • 1. Re: How to duplicate an image frame inside a text frame?
          Pontus Uggla Level 1

          I found the answer myself.

           

          app.documents[0].textFrames[0].paragraphs[0].duplicate(LocationOptions.after, app.documents[0].textFrames[0]);

           

          I had to refer to the paragraph, and since I know that there will allways be only one paragrah it's not a problem. Then I chose from this list:

           

          1650812527      LocationOptions.before

          1634104421      LocationOptions.after

          1650945639      LocationOptions.atBeginning

          1701733408      LocationOptions.atEnd

          1433299822      LocationOptions.unknown