🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16861

Re: VB accessing item lists by name

#16861
From: Olav Kvern
Date: Thu, 24 Jul 2003 17:19
20 lines
1576 bytes
Ralph--

It's a standard VB reference method, so I didn't think it was necessary to make a specific mention of it in the Scripting Guide (I was probably wrong). I did use it in several of the examples.

Any object that has a name property can be referred to using .Item("name"). If the character style with that name exists, using the reference you cited should work. Are you certain that it's not working? When you put a Watch on myCharStyle in the line:



Set myCharStyle = myDoc.CharStyles.Item("CaptionText") 




...and then step through the script, does the Watch window show that it's an object?

Also, I note (from your earlier messages) that you're using character styles to format whole paragraphs of text--why not use paragraph styles, instead? I think that they would work better for what you're trying to do.

Thanks,

Ole
Technical Details
Message-ID: <1dea0d30.0@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1dea0d30.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,9fdffd19221e0a9a
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-07-24 10:38:07 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: VB accessing item lists by name
Message-ID: <1dea0d30.0@WebX.la2eafNXanI>
Date: Thu, 24 Jul 2003 10:19:47 -0700
References: <1dea0d30.-1@WebX.la2eafNXanI>
Lines: 25
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit