🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16863

Re: [VB] Is this selection code correct?

#16863
From: Olav Kvern
Date: Thu, 24 Jul 2003 23:25
11 lines
1559 bytes
Alex--

First of all, welcome to InDesign scripting! It's great that you're giving it a try.

Your script will fail when your document contains more than one spread, because InDesign can't select objects on more than one spread at a time. You might want to change it to select all of the text frames in myInDesign.ActiveWindow.ActiveSpread, or do something to the frames without selecting them. Most of the time, there's no need to select an object to do something to it.

In addition, it's best to use "For...Next" loops rather than "For Each...Next" loops in InDesign, because "For Each...Next" loops will only get the first 255 instances of some object. In this case, it's probably fine, as your spread probably won't contain more than 255 empty text frames.<g>

Thanks,

Ole
Technical Details
Message-ID: <1dea0f0a.0@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1dea0f0a.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,8e54d420702ec636,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-07-24 16:37:54 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: [VB] Is this selection code correct?
Message-ID: <1dea0f0a.0@WebX.la2eafNXanI>
Date: Thu, 24 Jul 2003 16:25:18 -0700
References: <1dea0f0a.-1@WebX.la2eafNXanI>
Lines: 21
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit