Article View: adobe.scripting.indesign
Article #8585Re: textCleanUp.vbs remove character
From: Ben_Mathews
Date: Wed, 11 Oct 2006 19:22
Date: Wed, 11 Oct 2006 19:22
33 lines
2016 bytes
2016 bytes
Ole:
It still doesn't work for me but it is probably that I didn't do it properly. I didn't find 3 instances of Set myFoundItems = myObject.Search but instead, found Set myFoundItems = myInDesign.ActiveDocument.Search. That is what I changed.
Here is what I changed:
Else
myLoopLimit = 0
End If
End If
Loop
myInDesign.FindPreferences = idNothingEnum.idNothing
myInDesign.ChangePreferences = idNothingEnum.idNothing
End If
End If
End If
Loop
myFindChangeFile.Close
End If
End Function
Rem The third field in the line can be either "once" or "all".
myFindString = myInDesign.FindPreferences.FindText
myChangeString = myInDesign.ChangePreferences.ChangeText
Rem search text are found, if it's "once," search just once.
myFindLimit = myFindChangeArray(2)
If myFindLimit = "once" Then
Set myFoundItems = myObject.Search(myFindString, , , myChangeString)
Else
Set myFoundItems = myObject.Search(myFindString, , , myChangeString)
myLoopLimit = 0
Do While myFoundItems.Count > 0
Set myFoundItems = myObject.Search(myFindString, , , myChangeString)
Technical Details
Message-ID:
<3bc1f06d.4@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossingReferences:
<3bc1f06d.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,af3ab86490b28ad2 X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Ben_Mathews@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: Re: textCleanUp.vbs remove character Message-ID: <3bc1f06d.4@webcrossing.la2eafNXanI> Date: Wed, 11 Oct 2006 12:22:43 -0700 References: <3bc1f06d.-1@webcrossing.la2eafNXanI> Lines: 191 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossing