🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20930

Re: Find/Change FontStyle script

#20930
From: Olav Kvern
Date: Fri, 24 May 2002 21:31
11 lines
1545 bytes
J-- 

Try this: 

Dim myInDesign As InDesign.Application Set myInDesign = CreateObject("InDesign.Application.1.5") Set myStory = myInDesign.Documents.Item(1).Stories.Item(1) Rem No need to iterate backwards if you won't be changing character count. For myTextStyleRangeCounter = 1 To myStory.TextStyleRanges.Count     Set myTextStyleRange = myStory.TextStyleRanges.Item(myTextStyleRangeCounter)     Select Case myTextStyleRange.FontStyle         Case "Bold"             myTextStyleRange.Font = "Helvetica"         Case Else             Rem This will change all of the other text to "Times New Roman"             Rem Is that what you want? Or do you want it left alone?             Rem If so, omit this line.             myTextStyleRange.Font = "Times New Roman"     End Select Next  

Better? 

Thanks, 

Ole
Technical Details
Message-ID: <ef8ba8c.3@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.rt.ru!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <ef8ba8c.-1@WebX.aaQKaf7vad4>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,3e40abdc3590aeb6
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-05-24 14:37:36 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.rt.ru!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Find/Change FontStyle script
Message-ID: <ef8ba8c.3@WebX.aaQKaf7vad4>
Date: Fri, 24 May 2002 14:31:21 -0700
References: <ef8ba8c.-1@WebX.aaQKaf7vad4>
Lines: 30
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit