🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20046

Re: Find/Replace within text frames

#20046
From: Peter Boctor
Date: Tue, 05 Nov 2002 22:00
7 lines
1710 bytes
To open the document use the Open method on the Application. 

To search and replace text, set the FindPreferences and ChangePreferences on the Application to idNothing, this clears them. Then set the FindPreferences.FindText to the string you are looking for and ChangePreferences.ChangeText to the new text. Finally, issue a Search method on the Document object. You might want to set them back to idNothing when you are done, otherwise the next time the Find/Change dialog box comes up from the UI, the find and change text will be visible. 

To output a file to PDF you use the Export method on the Document object. Passing in idExportPDF for the exportFormat will output PDF. If you need to control the PDF export settings you can either set the PDFExportPreferences on the Application object or you can create a PDFExportStyle and pass that to the Export method. 

-peter
Technical Details
Message-ID: <1de67588.1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newspump.sol.net!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de67588.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,5d4915d17dae0ec9
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-11-05 14:12:10 PST
From: "Peter Boctor" <peter.boctor@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newspump.sol.net!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Find/Replace within text frames
Message-ID: <1de67588.1@WebX.la2eafNXanI>
Date: Tue, 5 Nov 2002 14:00:55 -0800
References: <1de67588.-1@WebX.la2eafNXanI>
Lines: 17
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit