Article View: adobe.scripting.indesign
Article #16837Re: [VBScript] How does moveTo work?
From: Alex Bu
Date: Thu, 31 Jul 2003 05:23
Date: Thu, 31 Jul 2003 05:23
28 lines
1744 bytes
1744 bytes
Hi Ole!
Thanks for your help again. Maybe you can help me with this one, too:
Dim myInDesign
Dim myObjects
Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
Set mySelection = myInDesign.Selection
Set myFrame = mySelection.Item(1)
myY1 = myFrame.GeometricBounds(0)
myX1 = myFrame.GeometricBounds(1)
myY2 = myFrame.GeometricBounds(2)
myX2 = myFrame.GeometricBounds(3)
Set myRectangle = myDocument.Pages.Item(1).Rectangles.Add
myRectangle.GeometricBounds = Array(myY1, myX1, myY2, myX2)
myRectangle.FillColor = myDocument.Colors.Item("Black")
myRectangle.FillTint = 20
myRectangle.StrokeColor = myDocument.Swatches.Item("None")
myRectangle.SendToBack
This one should add a rectangle around the selection. But somehow Indesign seems to have problems with this line:
myRectangle.GeometricBounds = Array(myY1, myX1, myY2, myX2)
Any idea what's wrong here? I'm sure you have :-)
Alex
Technical Details
Message-ID:
<1dea22ed.1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-05!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1dea22ed.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,7f15b4c91645e124 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-07-30 22:37:39 PST From: "Alex Bu" <12three@gmx.de> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-05!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: [VBScript] How does moveTo work? Message-ID: <1dea22ed.1@WebX.la2eafNXanI> Date: Wed, 30 Jul 2003 22:23:40 -0700 References: <1dea22ed.-1@WebX.la2eafNXanI> Lines: 29 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit