bgreenhouse
Technical User
Hi There
I'm essentially coding a find and replace method, but I don't want to use the replace function...Let me explain. I want to find phrases that fit a certain wildcard description, select them, do something to them and then put the resulting string back where they were. This works great with the find function (it leaves me with a selection of the found word that I can then access through the Selection object)...I then just manipulate the string and replace the original string with the new string (str_select) with:
Now, if I could have done this with "replace all", it would just loop through the whole thing until it didn't find any more. I want to do that too, but can't think of a loop condition...
Anyone?
B
I'm essentially coding a find and replace method, but I don't want to use the replace function...Let me explain. I want to find phrases that fit a certain wildcard description, select them, do something to them and then put the resulting string back where they were. This works great with the find function (it leaves me with a selection of the found word that I can then access through the Selection object)...I then just manipulate the string and replace the original string with the new string (str_select) with:
Code:
Selection.TypeText Text:=str_select
Now, if I could have done this with "replace all", it would just loop through the whole thing until it didn't find any more. I want to do that too, but can't think of a loop condition...
Anyone?
B