🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19333

Re: Please, help with find and replace within a specific object (Text Frame?).

#19333
From: Iolaire McFadden
Date: Thu, 26 Dec 2002 20:50
21 lines
1939 bytes
Olav,
Thanks for the guidance - your example works great. But, I still think there is something that perhaps I do not understand. (I'm working within the A-Master master page spread.) When I try to use the search code in a master page it doesn't work.
Example (I've created a some text on A-Master and labeled it Market_Title):

Sub test_change_masterspread_textframe() 
Set myInDesign = CreateObject("InDesign.application.2.0") 
Set myDocument = myInDesign.ActiveDocument 
Rem activate the first masterspread (by default named A-Master) 
Set myPage = myDocument.MasterSpreads.Item("A-Master") 
Set mytextframe = myPage.TextFrames.Item("Market_Title") 
Rem .Contents works 
mytextframe.Contents = "Washington Market" 
Rem .Search doesn't work 
mytextframe.Search "Washington", False, False, "CHICAGO" 
End Sub



The Scripting Guide shows that the MasterSpread property TextFrames is r/o - is that my problem? Perhaps I can not script changes to text on the master pages?
Thanks for your help,
iolaire
Technical Details
Message-ID: <1de71592.1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!wn11feed!worldnet.att.net!128.230.129.106!news.maxwell.syr.edu!colt.net!peernews3.colt.net!fr.colt.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de71592.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,88594b52b8ecdcde
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-12-26 13:08:04 PST
From: "Iolaire McFadden" <imcfadden@costar.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!wn11feed!worldnet.att.net!128.230.129.106!news.maxwell.syr.edu!colt.net!peernews3.colt.net!fr.colt.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Please, help with find and replace within a specific object (Text Frame?).
Message-ID: <1de71592.1@WebX.la2eafNXanI>
Date: Thu, 26 Dec 2002 12:50:53 -0800
References: <1de71592.-1@WebX.la2eafNXanI>
Lines: 24
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit