🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17642

[VB] Search & replace styles

#17642
From: Mouschi S.
Date: Wed, 28 May 2003 00:06
10 lines
1667 bytes
Muddling through the examples in this forum and elsewhere has ceased building my strength or character, and I am now�besides a scripting newbie�frustrated.

In an active document containing only one story, I need a VB script to:
(1) find every instance of italic text and replace them with a character style.
(2) find every instance of a paragraph having a paragraph style named �spit� and replace it with a paragraph style named �wine.�
(3) Do variations on (2) for other named paragraph styles up to 7 times.

That is, I�ve placed a Word document that has specific Word-defined paragraph styles assigned and need to change these to the equivalent ID-defined paragraph styles. In two of those Word paragraph styles, there may be italicized words, to which I want to assign a formal character style.

It seems like such a simple thing, but every syntax variation I try fails. I seem to confound the find/change and the ParagraphStyles/ParaStyle stuff. Thanks much,
Technical Details
Message-ID: <1de94b2d.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!sn-xit-09!supernews.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,c9ddfff45f26329f,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-05-27 17:08:15 PST
From: "Mouschi S." <mouschi@aol.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!sn-xit-09!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: [VB] Search & replace styles
Message-ID: <1de94b2d.-1@WebX.la2eafNXanI>
Date: Tue, 27 May 2003 17:06:05 -0700
Lines: 20
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit