Hi,
I am trying to replace a
word in a MS
word file by another word and then save the modified version. Here is how I am doing it now:
I read the word file as bytes and construct the
string by bytes and replace the word. Then I write the string to another file. The word can be found and replaced. But when I write the string back to a word file, MS word can't recognize it. It seems the file is corrupted.
I just replaced a word. I know I initially read in binaries. But I write them back as well. I don't know why MS word can't display it.
Please help. Thanks in advance.
--
Simon