Article View: adobe.scripting.indesign
Article #8897Duplicate Spreads from one Doc to another
From: Martin Fischer*
Date: Fri, 22 Sep 2006 13:16
Date: Fri, 22 Sep 2006 13:16
34 lines
1936 bytes
1936 bytes
I am trying to duplicate every spread from the first document to the second.
app.documents[0].spreads.everyItem().duplicate(LocationOptions.after, app.documents[1].spreads[-1])
While doing the task with the approach above somethimes the order of the spreads in the target document gets confused. So I tried to do this in a loop (with much better results):
for (oneSpread = 0; oneSpread < app.documents[0].spreads.length; oneSpread++)
app.documents[0].spreads[oneSpread].duplicate(LocationOptions.after, app.documents[1].spreads[-1])
But I have still a problem with both approaches: linked textframes of different spreads are unlinked.
I have even tried to do this with an itemByRange-Object of the spreads:
app.documents[0].spreads.itemByRange(0, app.documents[0].spreads.length-1).duplicate(LocationOptions.after,
app.documents[1].spreads[-1])
But the order of the spreads gets confused too and linked textframes of different spreads are unlinked.
Is there a forth approach that keeps the order and the links - even if the linked textframes of the source doc lay on different spreads?
Martin
Technical Details
Message-ID:
<3bc1bcb3.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon02.news.prodigy.net!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.albasani.net!news.motzarella.org!news.isoc.lu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,c344fda67858b01b,start X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Martin Fischer*" <martin.fischer@online.de> Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon02.news.prodigy.net!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.albasani.net!news.motzarella.org!news.isoc.lu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Duplicate Spreads from one Doc to another Message-ID: <3bc1bcb3.-1@webcrossing.la2eafNXanI> Date: Fri, 22 Sep 2006 06:16:11 -0700 Lines: 32 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit