Article View: adobe.scripting.indesign
Article #19648Re: VB: moving object with the known label
From: roberto soto
Date: Wed, 27 Nov 2002 20:55
Date: Wed, 27 Nov 2002 20:55
26 lines
1667 bytes
1667 bytes
Hi Vladimir (Privet)
Try to use the Collection object, after you can change the position.
Private Sub Command2_Click()
'******************************************
'Reconoce los objetos por el Label asignado
'******************************************
Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.Documents.Add
Set myPage = myDocument.Pages.Item(1)
Set myTextFrame = myPage.TextFrames.Add
myTextFrame.GeometricBounds = Array("3p", "3p", "13p", "18p")
myTextFrame.TextContents = "Hello"
myTextFrame.Label = "Text1"
Set myTextFrame = myPage.TextFrames.Add
myTextFrame.GeometricBounds = Array("21p", "23p", "33p", "38p")
myTextFrame.TextContents = "Hola"
myTextFrame.Label = "Text2"
Set mySelection = myInDesign.Selection
mySelection = myInDesign.Select(myPage.TextFrames.Item("Text1"))
End Sub
Roberto
Technical Details
Message-ID:
<1de6c292.0@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newspump.sol.net!news.maxwell.syr.edu!transit.news.xs4all.nl!bnewspeer00.bru.ops.eu.uu.net!emea.uu.net!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de6c292.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,15410e9a8120d085 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-11-27 13:07:43 PST From: "roberto soto" <roberto1soto@hotmail.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newspump.sol.net!news.maxwell.syr.edu!transit.news.xs4all.nl!bnewspeer00.bru.ops.eu.uu.net!emea.uu.net!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: VB: moving object with the known label Message-ID: <1de6c292.0@WebX.la2eafNXanI> Date: Wed, 27 Nov 2002 12:55:59 -0800 References: <1de6c292.-1@WebX.la2eafNXanI> Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit