Article View: adobe.scripting.indesign
Article #15384Re: Selecting text (hi-lighting)
From: Olav_Kvern
Date: Mon, 01 Dec 2003 20:49
Date: Mon, 01 Dec 2003 20:49
18 lines
1571 bytes
1571 bytes
dean-- The problem is that you're trying to tell the first item of myInDesign.Selection to select something. That won't work--Select is a method attached to the application object or to a document object(that's where you'd find it in the Scripting Guide). Rem If you already have a reference to a text frame "myTextFrame" Rem and an InDesign applciation object "myInDesign", then: myInDesign.Select myTextFrame.ParentStory.Characters.ItemByRange(10, 15) If you're using InDesign 2.x, you need to provide a character object rather than just a character index. So: myInDesign.Select myTextFrame.ParentStory.Characters.ItemByRange(myTextFrame.ParentStory.Characters.Item(10), myTextFrame.ParentStory.Characters.Item(15)) Hope this works/helps! Thanks, Ole
Technical Details
Message-ID:
<2cceab3c.3@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!easynet-monga!easynet.net!feed1.news.be.easynet.net!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2cceab3c.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,6ee22d6a26c254cc X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-12-01 13:08:05 PST From: Olav_Kvern@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!easynet-monga!easynet.net!feed1.news.be.easynet.net!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: Selecting text (hi-lighting) Message-ID: <2cceab3c.3@webx.la2eafNXanI> Date: Mon, 1 Dec 2003 12:49:56 -0800 References: <2cceab3c.-1@webx.la2eafNXanI> Lines: 20 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit