Article View: adobe.scripting.indesign
Article #17147Re: [VB] Placing groups into text boxes
From: roberto soto
Date: Tue, 08 Jul 2003 11:06
Date: Tue, 08 Jul 2003 11:06
41 lines
1850 bytes
1850 bytes
Hi Holt,
Here is a solution:
Set myIndesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myIndesign.Documents.Add
Set myPage = myDocument.Pages.Item(1)
Set myTextFrame = myDocument.TextFrames.Add
myTextFrame.GeometricBounds = Array("10p", "10p", "12p", "20p")
myTextFrame.TextContents = "This is image 1"
Set myRectangle = myDocument.Rectangles.Add
myRectangle.GeometricBounds = Array("5p", "10p", "9p", "20p")
myRectangle.Place "C:\test.jpg"
Set myGroup = myPage.Groups.Add(myDocument.Layers.Item(1), _
Array(myTextFrame, myRectangle))
Set myTextFrame1 = myDocument.TextFrames.Add
myTextFrame1.GeometricBounds = Array("20p", "10p", "30p", "25p")
Set myTextFrame2 = myDocument.TextFrames.Add
myTextFrame2.GeometricBounds = Array("50p", "10p", "40p", "25p")
myTextFrame1.NextTextFrame = myTextFrame2
myIndesign.Select myGroup
myIndesign.Cut
Set myPoint = myTextFrame1.InsertionPoints.Item(-1)
myIndesign.Select myPoint
myIndesign.Paste
myIndesign.Paste
myIndesign.Paste
Roberto
roberto1soto@yahoo.com
Technical Details
Message-ID:
<1de9cb86.6@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de9cb86.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,71b02edf67e48d56 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-07-08 04:08:05 PST From: "roberto soto" <roberto1soto@hotmail.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: [VB] Placing groups into text boxes Message-ID: <1de9cb86.6@WebX.la2eafNXanI> Date: Tue, 8 Jul 2003 04:06:58 -0700 References: <1de9cb86.-1@WebX.la2eafNXanI> Lines: 40 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit