My Word 97 macro searches for text, then takes some action. It may delete the found string and type more text or it may simply type more text. The macro may contain several (hundreds) find and replace instructions.
The problem: If the search string is not found, the new text is typed anyway.
How can I code the macro to not type the text if the search string is not found. I have used If Else successfully. However, I would like an overall solution, like OnError, so that I don't have to put an If Else at each search instruction. There doesn't seem to be an equivalent of WordPerfect's OnNotFound.
Does anyone have a solution?
Thanks so much
The problem: If the search string is not found, the new text is typed anyway.
How can I code the macro to not type the text if the search string is not found. I have used If Else successfully. However, I would like an overall solution, like OnError, so that I don't have to put an If Else at each search instruction. There doesn't seem to be an equivalent of WordPerfect's OnNotFound.
Does anyone have a solution?
Thanks so much