hi i can find a word in text file with Ansi Format and remove that line with code:

HTML Code:
Private Sub Command1_Click()
Dim iFile As Integer
Dim sLine As String, sNewText As String

iFile = FreeFile


Open "C:\1.txt" For Input As #iFile
Do While Not EOF(iFile)
  Line Input #iFile, sLine

  'If sLine Like "*network*" Then
    If sLine Like "*network*" Then
    ' skip the line

  Else
    sNewText = sNewText & sLine & vbCrLf
  End If
Loop
Close #iFile

iFile = FreeFile
Open "C:\1.txt" For Output As #iFile
sNewText = Mid(sNewText, 1, Len(sNewText) - 1)
Print #iFile, sNewText;
Close #iFile
End Sub

but this code just work on ANSI file and not work on UNICODE formats.

how can fix this problem?
thanks