Article View: adobe.scripting.indesign
Article #15907Re: ID stuck Newbie
From: Olav_Kvern
Date: Sun, 02 Nov 2003 21:52
Date: Sun, 02 Nov 2003 21:52
26 lines
1400 bytes
1400 bytes
ivo--
If you're using VB/VBScript (as I think you are), you can get a reference to the text frame as you create it:
Rem Given a reference to a page "myPage"...
Set myTextFrame = myPage.TextFrames.Add
If you've already created the text frames, you can find a text frame with a given id by iterating:
Rem Given an ID "myID" and a page "myPage"...
For myCounter = 1 to myPage.TextFrames.Count
If myPage.TextFrames.Item(myCounter).id = myID Then
Set myTextFrame = myPage.TextFrames.Item(myCounter)
Exit For
End If
Next
If you're using InDesign CS, you can use the ItemByID method:
Rem Given an ID "myID" and a page "myPage"...
Set myTextFrame = myPage.TextFrames.ItemByID(myID)
Hope that helps!
Thanks,
Ole
Technical Details
Message-ID:
<2cce21d1.0@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2cce21d1.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,9dbc9a514bc24a32 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-11-02 14:07:48 PST From: Olav_Kvern@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: ID stuck Newbie Message-ID: <2cce21d1.0@webx.la2eafNXanI> Date: Sun, 2 Nov 2003 13:52:31 -0800 References: <2cce21d1.-1@webx.la2eafNXanI> Lines: 22 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit