Filtering a text file
Sub FilterFile()
Open "infile.txt" For Input As #1
Open "output.txt" For Output As #2
TextToFind = "yourText"
Do While Not EOF(1)
Line Input #1, data
If InStr(1, data, TextToFind) Then
Print #2, data
End If
Loop
Close
End Sub
Related examples in the same category