Article View: adobe.scripting.indesign
Article #19061Re: Select text block in VB
From: Olav Kvern
Date: Tue, 21 Jan 2003 18:47
Date: Tue, 21 Jan 2003 18:47
29 lines
1548 bytes
1548 bytes
Jack-- Sorry about the lack of documentation on the ItemByRange method--it was added after the Scripting Guide was completed. (We've got quite a few examples of it in this forum, however.<g>) You might need to change your example a bit--the reference: myCaptionFrame.ParentStory.Characters.ItemByRange(myChar1, myCharLast) ...will probably return an Objects object. I think that: myCaptionFrame.ParentStory.Characters.ItemByRange(myChar1, myCharLast).Item(1) ...is probably safer. The Characters.Item(-1) reference is the same as Characters.Item(Characters.Count). I didn't use it much in the Scripting Guide, as I felt it was too "AppleScript-style" for VB (but I've gotten over that prejudice<g>). You'll note that this construction is also used lot in the examples in this forum. Thanks, Ole
Technical Details
Message-ID:
<1de7681a.4@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de7681a.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,148624ca6847d0bb X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-01-21 11:10:03 PST From: "Olav Kvern" <okvern@adobe.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Select text block in VB Message-ID: <1de7681a.4@WebX.la2eafNXanI> Date: Tue, 21 Jan 2003 10:47:02 -0800 References: <1de7681a.-1@WebX.la2eafNXanI> Lines: 29 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit