ma_roberge
09-06-2016, 01:56 PM
I am writing a procedure with two parameters that will add a zero-width space (8203, U+200B) after the slashes to allow correct word wrap of URLs (something that Word ought to do by itself to avoid all those unacceptable wide spaces, especially in justified text):
.Text: ([0-9A-z]/)([0-9A-z])
.ReplacementText: \1*****\2 (the character should be inserted in place of the asterisks)
The search and replace works perfectly when I perform it in Word itself, but, for some reason, I cannot insert into the VBA editor the desired zero-width space; in Word, with paragraph marks visible, this shows as a square within a larger one. If I copy and paste the symbol from Word to the VBA editor, I get a question mark in my code, and I do not know the format that can (or must) be used to enter the character into the replacement string.
Thanks in advance for any help.
.Text: ([0-9A-z]/)([0-9A-z])
.ReplacementText: \1*****\2 (the character should be inserted in place of the asterisks)
The search and replace works perfectly when I perform it in Word itself, but, for some reason, I cannot insert into the VBA editor the desired zero-width space; in Word, with paragraph marks visible, this shows as a square within a larger one. If I copy and paste the symbol from Word to the VBA editor, I get a question mark in my code, and I do not know the format that can (or must) be used to enter the character into the replacement string.
Thanks in advance for any help.