Hi Everyone.
I have found the sample about replacement text in word document by VBScript as attached file.
But when run, it not replace text which I want.
Pls check and correct me.
Thanks in advance!
replace text.7z (25.1 KB)
Hi Everyone.
I have found the sample about replacement text in word document by VBScript as attached file.
But when run, it not replace text which I want.
Pls check and correct me.
Thanks in advance!
replace text.7z (25.1 KB)
Hi Everyone.
Thanks you… I have found the mistake.
There is a space in main folder “replace text”… I have changed it into “replacetext” and OK.
I’m glad it’s resolved. If you have any further questions regarding VBS, please reply.
Hi Bro.
I have one difficult.
the find text: “cat”
the replaced text: “dog dog”
If the replaced text contains a space between characters… then it not replace.
How to accept space in string when replace text.
Thanks you!
Hi Bro.
Sorry, I use text from Excel Column for replacement.
Exp: Row(“Replacement”).ToString ( Cell A1: “Black Dog” )
If I use code as above… it only got “Black” for replacement
It’s not clear how your code is going, but if you want to replace it, try something like this:
Script

Before Run

After Run

PS. If it’s a space issue, you can also do this:
The value was entered, but it may be invisible due to the cell size. In that case, use Autofit.


Thanks you very much bro ![]()