How to find a word in html or text file
Printable View
How to find a word in html or text file
Usually you can use the INSTR (In String) function to locate a specific string, including entire words or phrases.
The best way to do this is to load the entire file into a variable and the search the string for whatever word you want
ie.
Open "test.html" for binary as #1
holdstring = input$(LOF(1), 1)
If InStr(1, holdstring, "myword")then
MsgBox "Found Word"
else: MsgBox "Couldn't Find It"
End If
Close #1
just make sure that you give the full filename and path for the file when you open it.
Hope this is of some help.