Article View: adobe.scripting.indesign
Article #16336Re: [VB] Working with GeometricBounds
From: Iolaire McFadden
Date: Thu, 25 Sep 2003 15:39
Date: Thu, 25 Sep 2003 15:39
20 lines
1583 bytes
1583 bytes
This code works for setting your objects bounds, see this helps.
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
myBounds = DocCDN.GeometricBounds
myBounds(1) = myBounds(1) - MarginB
myBounds(3) = myBounds(3) - MarginL
DocCDN.GeometricBounds = myBounds
end sub
Good luck,
iolaire
Technical Details
Message-ID:
<2ccd88b5.2@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!feed4.newsreader.com!h4-test.kcwc.com!kcwc.com!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!eusc.inter.net!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 09:08:11 PST From: "Iolaire McFadden" <imcfadden@costar.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!feed4.newsreader.com!h4-test.kcwc.com!kcwc.com!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: [VB] Working with GeometricBounds Message-ID: <2ccd88b5.2@webx.la2eafNXanI> Date: Thu, 25 Sep 2003 08:39:28 -0700 References: <2ccd88b5.-1@webx.la2eafNXanI> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Lines: 20