Article View: adobe.scripting.indesign
Article #18707Re: page from 1 document 2 an other
From: BATTISTELLI Laurent
Date: Fri, 21 Feb 2003 11:59
Date: Fri, 21 Feb 2003 11:59
75 lines
2703 bytes
2703 bytes
I got a better solution
Public Function transfert(mydocument As InDesign.Document, pageNumber As
Integer, myIndesign As InDesign.Application)
Dim myNewDoc As InDesign.Document
Dim pageToCopy As InDesign.Page
Dim myNewPage As InDesign.Page
Dim myTextFrame As InDesign.TextFrame
Dim myPageItems As InDesign.PageItems
Dim i As Integer
Set pageToCopy = mydocument.Pages.Item(pageNumber)
Set myWindow = myIndesign.ActiveWindow
Set mySpread = myWindow.ActiveSpread
Set myPageItems = mySpread.PageItems
Rem In this example, a "For Each" loop adds the objects to
Rem the selected one object at a time.
For Each object In myPageItems
myIndesign.Select object, True
Next object
myIndesign.Copy
Set myNewDoc = myIndesign.Documents.Add
Set myNewPage = myNewDoc.Pages.Add
myIndesign.Paste
End Function
somtimes I'm proud !!
by this way I copy all the items of the active spread and create a new
page and copy all of these on this new !
good no ?
BATTISTELLI Laurent a οΏ½crit:
> Good morning
>
> I need help
>
> How can I copy a page from one document to an other ?
>
> I try
>
> Public Function transfert(mydocument As InDesign.Document, pageNumber As
> Integer, myIndesign As InDesign.Application)
>
> Dim myNewDoc As InDesign.Document
> Dim pageToCopy As InDesign.Page
> Dim myNewPage As InDesign.Page
>
> Set myNewDoc = myIndesign.Documents.Add
> Set pageToCopy = mydocument.Pages.Item(pageNumber)
> Set myNewPage = myNewDoc.Pages.Add
> Set myNewPage = pageToCopy
>
> End Function
>
> but the result is not good
>
> when I have a look on the description of myNewPage all things are good
> but my new page is blank
>
>
> If you know how to copy a page from on document to an other
>
> thanks
>
Technical Details
Message-ID:
<3E561494.1080205@comidoc.fr>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<3E54F73A.2060305@comidoc.fr>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,354e3e03a5255de6 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-02-21 04:07:52 PST From: BATTISTELLI Laurent <l.battistelli@comidoc.fr> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: page from 1 document 2 an other Message-ID: <3E561494.1080205@comidoc.fr> Date: Fri, 21 Feb 2003 03:59:16 -0800 References: <3E54F73A.2060305@comidoc.fr> Lines: 79 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: fr-fr, fr MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit