-
Also, if your objective is to replace all in one swoop, then Greg's code is better, as it does precisely that. Mine actions each individually.
The difference is that Greg's code does NOT have the additional test of:
[vba]
If Asc(r.Text) > 32 Then
[/vba]
His replaces all, with no testing the ASCII of the first character. If the situation is that some of the .Found may not pass that test, and some will, then obviously you need the test. In which case, you need to action each individually in order to DO that test.
That is why I added it.
Although I have to say that it seems unlikely that you are going to have a word in the reference doc that DOES have Asc(first)character) as < 32. If it does, it seems to me that your reference doc is in error.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules