Article View: adobe.scripting.indesign
Article #16340Re: [VB] Working with GeometricBounds
From: Iolaire McFadden
Date: Thu, 25 Sep 2003 17:36
Date: Thu, 25 Sep 2003 17:36
19 lines
1528 bytes
1528 bytes
Is this what you mean? (I don't really understand what you want.)
Sub testing()
Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
' here I just pick a page to measure = 1, you probably want to use your current page
Set my_page_items = myDocument.Pages.Item(1).AllPageItems
' here I set DocCDN to page item = 1, you want to use your object to change
Set DocCDN = my_page_items.Item(1)
MarginB = myDocument.Pages.Item(1).MarginPreferences.MarginBottom
MarginL = myDocument.Pages.Item(1).MarginPreferences.MarginLeft
' get bounds of page = 1
myNew = myDocument.Pages.Item(1).bounds
' subtract Margins from page bounds
myBounds(1) = myNew(1) - MarginB
myBounds(3) = myNew(3) - MarginL
DocCDN.geometricbounds = myBounds
End Sub
Technical Details
Message-ID:
<2ccd88b5.6@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccd88b5.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,34141f6e382b2aea X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-09-25 10:38:18 PST From: "Iolaire McFadden" <imcfadden@costar.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: [VB] Working with GeometricBounds Message-ID: <2ccd88b5.6@webx.la2eafNXanI> Date: Thu, 25 Sep 2003 10:36:58 -0700 References: <2ccd88b5.-1@webx.la2eafNXanI> Lines: 21 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit