
Opening MSword document with VB4.0/VB5.0
You'll need to get MS Words' file protocol in order to screen out formatting
codes. That's no small task.
However, individual words in Word, although surrounded by formatting code,
exist as their ASCI equivalents within the Word file. Just open the file as
Binary, read in a good chunk of the file, scan it for the word you're looking
for using the InStr function, and you should be able to find it. Then read in
the next part of the file (set the pointer back about 200 bytes to ensure that
any words clipped in the last read are thus read in the next Get statement) and
continue scanning.
Be aware that any words with apsotrophes will not be found, since Word does not
use the simple ASCI apostrophe. You will also not be able to find groups of
words this way, since all words in Word files are separated by formatting code
and not the simple ASCI 32 character. Make sure you use InStr with the
"compare" argument set to 1 (not case sensitive). You need to use the "start"
argument also when you do this.
Steve Pugliese