-
-
2. Re: Copy text frames between documents
Dan-BTP Mar 20, 2013 2:39 PM (in response to [Ariel])I don't see any reply.
-
3. Re: Copy text frames between documents
[Ariel] Mar 20, 2013 2:44 PM (in response to Dan-BTP)Sorry -- it's a bug in the forum software that sometimes answers
submitted by email don't appear. What I said is:
You should avoid using copy(), paste() etc. -- there's almost always a
better way of doing things.
In this case, check out the duplicate method of a textFrame:
TextFrame.duplicate (to:varies, by:Array of Measurement Unit (Number or
String)): PageItem
Adobe InDesign CS6 (8.0) Object Model
Duplicates the TextFrame at the specified location or offset.
to: Data Type: varies
The location of the new TextFrame, specified in coordinates in the
format . Can accept: Array of 2 Units, Spread, Page or Layer.
(Optional)
by: Data Type: Array of Measurement Unit (Number or String)
Amount by which to offset the new TextFrame from the original
TextFrame's position. (Optional)
You can see that the "to" parameter of duplicate() accepts various
things, one of which seems to be what you're looking for: page.
So if you set myPage to be a page in a second document, presumably you
will find that it has been duplicated to that page:
myTextFrame.duplicate(myPage)
Try that and see where the text frame lands up.
If it's not in the right place, I would suggest copying the
geometricBounds of the source textFrame to the new textFrame (there may
be other ways of doing that). Just make sure that the ruler origin and
measurement units in both documents are the same.
HTH,
Ariel
-
4. Re: Copy text frames between documents
Dan-BTP Mar 20, 2013 3:05 PM (in response to [Ariel])That was exactly what I needed. Thanks very much!

