Well, im not entirely sure what you mean but i think i know.. Try this as a starting point.
Code:Dim Reader As New StreamReader("C:/email.txt") Dim Line As String = Reader.ReadLine() Do Until Reader.EndOfStream = True If Line.Contains("some word") AndAlso Not Me.TextBox1.Text.Contains(Line) Then Me.TextBox1.AppendText(Line + vbNewLine) 'TextBox1.AppendText(Line) = TextBox1.Text + Line & Environment.NewLine TextBox1.SelectionLength = TextBox1.Text.Length TextBox1.ScrollToCaret() End If Line = Reader.ReadLine Loop Reader.Close()




Reply With Quote