how i can check any text string in a doc file.the searchinh should be fast as i have to do other code if it found the string
kapil.goyal
0
Light Poster
Recommended Answers
Jump to PostAre you talking about a file on disk or loaded into a richtext or text box? The latter two can be done with the InStr function.
Unles you want to load the file into memory the first is a lot harder and slower to do.
Jump to Posthow i can check any text string in a doc file.the searchinh should be fast as i have to do other code if it found the string
u can do one thing...
open the file/doc in input mode...
read line by line...
in every check weather ur string is …
Jump to Post>can u provide me the code.
We do not just provide code. If you are too lazy to even try then you might as well give up programming altogether.
Jump to PostSend each filename and string you want to find to this function. It will return true if the string is found and false if the string is not found.
Private Function CheckFile(ByVal FileName As String, ByVal strSearch As String) As Boolean Dim s As String = My.Computer.FileSystem.ReadAllText(FileName) …
All 15 Replies
waynespangler
63
Posting Pro in Training
kapil.goyal
0
Light Poster
wavalker
0
Newbie Poster
kapil.goyal
0
Light Poster
iamthwee
waynespangler
63
Posting Pro in Training
kapil.goyal
0
Light Poster
kk_dj
0
Newbie Poster
waynespangler
63
Posting Pro in Training
kapil.goyal
0
Light Poster
waynespangler
63
Posting Pro in Training
kk_dj
0
Newbie Poster
waynespangler
63
Posting Pro in Training
kill_seth
0
Newbie Poster
vishalrane
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.