Article View: adobe.scripting.indesign
Article #18454Re: AS. Search and replace text with different paragraph styles
From: Dave Saunders
Date: Thu, 27 Mar 2003 00:51
Date: Thu, 27 Mar 2003 00:51
21 lines
1608 bytes
1608 bytes
Glad the script works for you. The key to doing what you want will be differentiating the ones you want to change from the ones you don't want changing. If you wanted to change all of them it would be easy, just add: set applied paragraph style of character myParaIndex of myStory to paragraph style "Fred" of document 1 inside the loop. But, you probably need to test something first, like: is the previous paragraph styled in a certain way? To do that, you could say: try If name of applied paragraph style of paragraph 1 of character (myParaIndex -1) is "Whatever" then set applied paragraph style of character myParaIndex of myStory to paragraph style "Fred" of document 1 end if end try The reason for the try is that perhaps myParaIndex has the value 1 in which case the test will cause an error, so we just ignore that case. Dave
Technical Details
Message-ID:
<1de8743a.4@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de8743a.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,84b62141db21aa59 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-03-26 17:07:50 PST From: "Dave Saunders" <daves@pdsassoc.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: AS. Search and replace text with different paragraph styles Message-ID: <1de8743a.4@WebX.la2eafNXanI> Date: Wed, 26 Mar 2003 16:51:15 -0800 References: <1de8743a.-1@WebX.la2eafNXanI> Lines: 28 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit