Article View: adobe.scripting.indesign
Article #16202Re: Problem accessing TextFrames (in VB)
From: darinplutchok
Date: Thu, 02 Oct 2003 00:40
Date: Thu, 02 Oct 2003 00:40
12 lines
1395 bytes
1395 bytes
Here is the code sample. It failed to show up as it was enclosed in script tags.
Dim myInDesign
Set myInDesign = CreateObject("InDesign.Application.2.0")
Dim myDocument
Set myDocument = myInDesign.ActiveDocument
'Returns 3 PageItems for the first group
document.write(CStr(myDocument.Groups.Item(1).PageItems.Count))
'Returns the ID for the first PageItem
document.write(CStr(myDocument.Groups.Item(1).PageItems.Item(1).ID))
'Returns error when I try to get TextFrames from this PageItem "Object doesn't support this property or method..."
document.write(CStr(myDocument.Groups.Item(1).PageItems.Item(1).TextFrames.Count))
Technical Details
Message-ID:
<2ccd99ee.0@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccd99ee.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,a0164f3ca089c26f X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-10-01 18:07:59 PST From: darinplutchok@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: Problem accessing TextFrames (in VB) Message-ID: <2ccd99ee.0@webx.la2eafNXanI> Date: Wed, 1 Oct 2003 17:40:12 -0700 References: <2ccd99ee.-1@webx.la2eafNXanI> Lines: 15 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit