Read/Write MS Word docs
PEChumbley at aol.com
PEChumbley at aol.com
Fri Sep 6 09:57:01 EDT 2002
I have an application where I read in Microsoft Word (.doc) documents as if
they are a text file and then search for phrases within them. The control
characters in the document appear as gibberish so I am still able to search
for the phrases in the readable portion of the file. If I get a match, I
then write the text to a file with a new name but still with a ".doc" file
extention. So basically, I am looking for a particular Word document and
then renaming it. My problem is that MS Word will not open the new file. I
get an error message saying the "document name or path is not valid" when
both the document name is simply of the form "CR1000.doc" and path is
correct. I also tried it with a binary read and got the same result. Has
anyone had any experience with this situation? Am I changing something in
the file when I read it in and write it back to a file such that Word no
longer will open it?
Philip Chumbley
More information about the metacard
mailing list