N
NavyPsych
I have a macro with a find and replace array. I haven't had any
problems with using wildcards until I tried to replace every instance
of "#-#" , i.e. "3-12" or "5-9" and simply replace the dash with "to",
i.e. change "3-12" to "3 to 12." Anyway, these find and replace terms
work perfectly in Word:
Find: ^32([0-9]{1})^45([0-9]{1,2}[!0-9])
Replace: \1 to \2
But, when I use the same in my VBA find and replace array, it doesn't
work. For example, if I have the sentence:
"Mike's parents separated when he was age 1-2."
If I simply find and replace within Word I get: "Mike's parents
separated when he was age 1 to 2."
But when I run the macro I get: "Mike's parents separated when he was
age12. to " <-- (two spaces before and after "to")
All my other wildcard strings in this array work without a problem.
Any ideas?
problems with using wildcards until I tried to replace every instance
of "#-#" , i.e. "3-12" or "5-9" and simply replace the dash with "to",
i.e. change "3-12" to "3 to 12." Anyway, these find and replace terms
work perfectly in Word:
Find: ^32([0-9]{1})^45([0-9]{1,2}[!0-9])
Replace: \1 to \2
But, when I use the same in my VBA find and replace array, it doesn't
work. For example, if I have the sentence:
"Mike's parents separated when he was age 1-2."
If I simply find and replace within Word I get: "Mike's parents
separated when he was age 1 to 2."
But when I run the macro I get: "Mike's parents separated when he was
age12. to " <-- (two spaces before and after "to")
All my other wildcard strings in this array work without a problem.
Any ideas?