🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20816

Re: Iterate through all Character styles?

#20816
From: Olav Kvern
Date: Thu, 30 May 2002 17:02
9 lines
1312 bytes
GeekGod-- 

That's the right approach, but, for now, anyway, don't use the For Each...Next construction. A bug in our handling of collection objects means that For Each...Next will only iterate through the first 256 objects in a collection. Instead, use For <counter> = <initial value> to <final value>...Next construction. 

This problem won't come up very often when you're iterating through character styles, but it will for other collections (Application.Fonts, Story.Characters, Page.PageItems are all good examples). 

Thanks, 

Ole
Technical Details
Message-ID: <ef8d475.1@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!peer1-sjc1.usenetserver.com!usenetserver.com!newsfeed1.cidera.com!Cidera!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <ef8d475.-1@WebX.aaQKaf7vad4>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,8aca7d6dae2730cc
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-05-30 10:07:59 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!peer1-sjc1.usenetserver.com!usenetserver.com!newsfeed1.cidera.com!Cidera!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Iterate through all Character styles?
Message-ID: <ef8d475.1@WebX.aaQKaf7vad4>
Date: Thu, 30 May 2002 10:02:44 -0700
References: <ef8d475.-1@WebX.aaQKaf7vad4>
Lines: 15
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit