I want to read text from .doc file ''Which is contain some email address like 'abc@gmail.com' and write into .text file in same format .
for this I had code as following.. to read data into binary and write into text file as text after convert into text , but it is not giving me correct response.
What is wrong with it please guide........
Dim FILE_NAME As String = C:\Users\Owner\Documents\test.Doc
Dim StringReader() As String
Dim finStream1 As New IO.FileStream(FILE_NAME, IO.FileMode.Open, IO.FileAccess.Read)
Dim fStream1 As New IO.FileStream("C:\Users\prakash\Desktop\EmailTEst.text, IO.FileMode.Create, IO.FileAccess.Write)
Dim br As New IO.BinaryReader(finStream1, System.Text.Encoding.UTF8)
Dim bw As New IO.StreamWriter(fStream1)
Dim byteRead As Byte
br.BaseStream.Seek(3, IO.SeekOrigin.Begin)
Dim strstring As String = ""
While br.ReadByte > 0
byteRead = br.ReadByte
strstring = strstring & Char.ConvertFromUtf32(byteRead)
bw.Write(strstring)
End While
br.Close()
bw.Close()
Thanks for your advice to improve my question.