This content has been marked as final. Show 6 replies
I've had that problem in desktop InDesign. It's why I always explicitly put undefined into the replacingWith parameter when doing finds.
Thanx for that little hint.
But.. I forgot to say that I'm using VB.net. I tried using Nothing which probably is the closest to undefined you can get in VB. But it throws an exception. I also tried the Indesign.IdNothingEnum, but that doesn't work either.
Anybody out there with any VB.net experience on Indesign?
Have you tried ""? That's what works in the UI, now I think about it.
That replaces all occurences with an empty string.
Right now my solution is to search for something I know is not there and replace with "". That "resets" the replacingWith value.
I have not found any other way to do this in VB.net.
But thanx very much Dave for giving possible solutions, I have learned A LOT from you and Olavs answers on this forum and the scripting forum.
Ah, I misunderstood. I thought you were talking about situations where you are applying a style or formatting to the found text.
I've been doing a lot of scripting for the server and I've not run into this problem, but I also don't directly interact with the server myself (I write the scripts and test them locally, the client runs them on the server).
Off the top of my head, I can't recall if any of these scripts have used Find/Change. I'll dig around.
Have you tried:
app.changePreferences.changeText = null;
It's that Server uses the J version of the search method (because it incorporates all of the J features), so there are two additional parameters to add between the find text and change text parameters. If the version for the Roman desktop application looks like this:
...then the server version should be:
(Hope this works--I'm typing it in some haste and do not currently have a machine with either server or the J version available.)