🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18674

Re: page from 1 document 2 an other

#18674
From: Ben Dupre
Date: Sun, 02 Mar 2003 02:56
39 lines
1893 bytes
Not having much luck either way now.

For Each oldFrame In sourceDoc.Pages(i).pageItems

Set id.ActiveDocument = sourceDoc
            Set id.ActiveWindow = sourceWindow
            Set id.ActiveWindow.ActiveSpread = sourceDoc.Pages.Item(i).Parent

id.Select oldFrame, False

id.Copy

Set id.ActiveDocument = destDoc
            Set id.ActiveWindow = destWindow
            Set id.ActiveWindow.ActiveSpread = destPage.Parent



id.Paste

id.ActiveWindow.ActiveSpread.pageItems.Item(1).GeometricBounds = oldFrame.GeometricBounds



Next oldFrame

this code keeps crashing because oldFrame=nothing

When I look in the locals window and expand sourceDoc.Pages(21).pageitems

There are eight items in the collection.

This seems to work for the first run through. (first page is 20) when it goes to the next page (21) it copies and pastes 4 frames then craps giving me a type mismatch in the next oldframe line.

When it stops, oldframe shows "nothing" as you hover the mouse over the variable in the code window.

I'm completely stumped.

Ben
Technical Details
Message-ID: <1de7f166.10@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <3E54F73A.2060305@comidoc.fr>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,354e3e03a5255de6
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-03-01 19:07:29 PST
From: "Ben Dupre" <bdupre@removethis.sauer-danfoss.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: page from 1 document 2 an other
Message-ID: <1de7f166.10@WebX.la2eafNXanI>
Date: Sat, 1 Mar 2003 18:56:18 -0800
References: <3E54F73A.2060305@comidoc.fr>
Lines: 43
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit