i have text file and i have to serch word in that file using access vba code
i am not understanding how to write code for searching particular word.....
i have tried following code BUT THERE IS PROBLEM
Expand|Select|Wrap|Line Numbers
- Dim objStreamReader As StreamReader
- Dim strLine As String
- 'Pass the file path and the file name to the StreamReader constructor.
- objStreamReader = New StreamReader("C:\Boot.ini")
- 'Read the first line of text.
- strLine = objStreamReader.ReadLine
- 'Continue to read until you reach the end of the file.
- Do While Not strLine Is Nothing
- 'Write the line to the Console window.
- Console.WriteLine(strLine)