Article View: adobe.scripting.indesign
Article #15542Problem with Spreads & Pages
From: scottsa
Date: Mon, 24 Nov 2003 12:53
Date: Mon, 24 Nov 2003 12:53
29 lines
2090 bytes
2090 bytes
Hello all,
I have done this before but for some reason I'm missing something and, well, the frustration level is getting high. I tried to search the archvies for this but didn't find what I was looking for... but did find ohter useful=stuff.
My problem is this, I create a 100 page book from a database (converted to XML and then placed via custom VB/InDe code). The document is using facing pages (2 pages per spread).
The first & second pages layout okay (spread 1 - index 1, spread 2 - index 1) but the third and subsequen odd pages (spread n - index 2) end up with their content on the even-numbered (left-hand or spread n - index 1) pages.
I need to be able to target these pages.
Basically I create the page as:
Private mobjCurDoc As InDesign.Document
dim mobjCurPage as InDesign.Page
Set mobjCurPage = mobjCurDoc.Pages.Add
Of course, using my variable mobjCurPage won't directly access the pages I'm having trouble with. In the past i've been able to target, I'm sure, by getting the last spread, then getting the last indexed page (the newest one) someting like this:
intSpreadCount = mobjCurDoc.Spreads.Count
Set mobjCurSpread = mobjCurDoc.Spreads.Item(intSpreadCount)
intSpreadPages = mobjCurSpread .Count
Set mobjCurPage = mobjCurSpread.Pages.Item(intSpreadPages)
then I can
mbojCurPage.some_action
I've also tried variants, instead of integers to pass the values, with no luck.
Any thoughts on what I'm doing wrong?
Scott
Technical Details
Message-ID:
<2cce8f90.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,7db3cc42659434f9,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-11-24 05:07:44 PST From: scottsa@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Problem with Spreads & Pages Message-ID: <2cce8f90.-1@webx.la2eafNXanI> Date: Mon, 24 Nov 2003 04:53:13 -0800 Lines: 41 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit