8 Replies Latest reply on Jul 24, 2011 8:32 AM by Dargon Kong

    How to cut a textframe and place it in the specific position in another textframe?

    Dargon Kong Level 1

      I need to export RTF format. So I have to select the contents of the textframe.

      As you can see below,

      first, I have to override all the master page objects (like Job bar and the page number).

      Second, then cut the two objects and paste them into the bodytext and set the anchor and position.

      I have so many files to do so from time to time.


      So I write the code below (indesign cs 3 javescript, just try to make a simple example):


      var jobbar = app.documents[0].pages[0].textframe[0]

      var pagnum = app.documents[0].pages[0].textframe[2]

      var bodtex = app.documents[0].pages[0].textframe[1]


      bodtex.insertionPoints[0].contents = app.paste()


      bodtex.insertionPoints[0].contents  = app.paste()

      bodtex.textFrames[0].anchoredObjectSettings.anchoredPosition = AnchorPosition.ANCHORED

      bodtex.textFrames[1].anchoredObjectSettings.anchoredPosition = AnchorPosition.ANCHORED



      It doesn't work.

      I want to do like this. The main problem is that I don't know how to put a object into the specfic position of a textframe.


      Thanks in advance.