🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16860

VB accessing item lists by name

#16860
From: Ralph Stirling
Date: Thu, 24 Jul 2003 16:00
8 lines
1543 bytes
I have found that I can access a font by referring to it as: myInDesign.Fonts.Item("Comic Sans") for example. What other object lists can be accessed by supplying the name as the argument of the Item method? I wanted to access character styles the same way: myDoc.CharStyles.Item("CaptionText"), where the CaptionText style is already present in the document, but this doesn't work.

The Scripting Guide says nothing about what type of arguments the Item method takes for different objects (that I could find).

I can certainly loop through the style items and compare .Name with the style I'm looking for, but it would sure be convenient to use the same technique used for fonts.

Thanks,
-- Ralph
Technical Details
Message-ID: <1dea0d30.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!news-FFM2.ecrc.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,9fdffd19221e0a9a,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-07-24 09:08:24 PST
From: "Ralph Stirling" <stirra@wwc.edu>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!news-FFM2.ecrc.net!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: VB accessing item lists by name
Message-ID: <1dea0d30.-1@WebX.la2eafNXanI>
Date: Thu, 24 Jul 2003 09:00:57 -0700
Lines: 16
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit