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!
There is usually no problem, the spacebar inside double quotes works fine.
I could tell Chr (34), but I think it is a parameter problem. If you write the code as it is,
A short comment is attached to the code screenshot below, so check it out.
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
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.