I have this piece of code which highlights the desired text
My question is, is it possible to export the highlighted code into a new text or word document??Code:For x As Integer = 0 To Form1.txtLocat.Lines.GetUpperBound(0) If Form1.txtLocat.Lines(x).Contains(txtFind.text) Then Form1.Show() Hide() Form1.txtLocat.SelectionStart = Form1.txtLocat.GetFirstCharIndexFromLine(x) Form1.txtLocat.SelectionLength = Form1.txtLocat.Lines(x).Length Form1.txtLocat.SelectionColor = Color.Green End If




Reply With Quote