
Finding text inside Word doc without Word?
If you want to just search the files for text strings, open the files as
Binary files, read the file into a string variable and search for the text
string. The following code will process the contents of a folder.
fname = Dir$(path & "\*.doc")
do until len(fname)=0
Open path & "\" & fname For Binary as fptr
flen = LOF(fptr)
sBuffer = String(flen,0)
Get #fptr,,sBuffer
if Instr(sBuffer,SearchString) then
... 'Process the file however you want
endif
fname = Dir$
loop
Quote:
>Is there a way to find text inside Word documents, on a computer where Word
>is not available (only WordView), and where i can't use Find (advanced)
from
>W95.
>Is it possible to create a prog witch can do this??
>Any suggestion are welcome....
>Stephan
>--
>To send E-mail, remove the spamblock ".rotzooi"
>Om E-mail te sturen, verwijder de rotzooi.