🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18249

Re: Going to a certain page.

#18249
From: Olav Kvern
Date: Thu, 10 Apr 2003 18:11
21 lines
1686 bytes
Brian--

Do you need to turn to the page for some reason? (The only reason I can think of is to use copy/paste.)

"ActiveSpread" can be set to any spread object available in the document--and Page.Parent is a Spread. If you know the index of the page within the document, you can display the spread using something like this:



Rem Given a page number "myPageNumber", a document "myDocument", and an application reference to "myInDesign"... 
myInDesign.ActiveSpread.ActiveWindow = myDocument.Pages.Item(myPageNumber).Parent 




If you're creating a variable "myPageNumber" and "myDocument.Pages.Item(myPageNumber)" doesn't work, it's probably because the variable is not the right type--I'm guessing it's a string pulled from an Access form field. In that case, try converting the variable to an integer ("myDocument.Pages.Item(Cint(myPageNumber))").

Hope this helps!

Thanks,

Ole
Technical Details
Message-ID: <1de8af03.1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de8af03.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,f10383af29a249f6
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-04-10 11:38:08 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!newsfeed.gamma.ru!Gamma.RU!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: Going to a certain page.
Message-ID: <1de8af03.1@WebX.la2eafNXanI>
Date: Thu, 10 Apr 2003 11:11:13 -0700
References: <1de8af03.-1@WebX.la2eafNXanI>
Lines: 26
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit