G
Guest
I have console application where i can read line by line from a .txt file and
save it to a different file name in .txt format as well.
Here's the basic code:
using System.IO namespace
Dim fs As New FileStream(reportPath, FileMode.Open, FileAccess.Read)
Dim fs1 As New FileStream(writePath, FileMode.Create, FileAccess.Write)
Dim oReader As New StreamReader(fs)
Dim oWrite As New StreamWriter(fs1)
Dim sLine As String = ""
Do
sLine = oReader.ReadLine()
oWrite.WriteLine(sLine)
Loop Until sLine Is Nothing
oReader.Close()
oWrite.Close()
Problem now, I have a .doc file that I want to convert and saveas .txt format
How can I do similar like the above only applies to .doc format into .txt
format
save it to a different file name in .txt format as well.
Here's the basic code:
using System.IO namespace
Dim fs As New FileStream(reportPath, FileMode.Open, FileAccess.Read)
Dim fs1 As New FileStream(writePath, FileMode.Create, FileAccess.Write)
Dim oReader As New StreamReader(fs)
Dim oWrite As New StreamWriter(fs1)
Dim sLine As String = ""
Do
sLine = oReader.ReadLine()
oWrite.WriteLine(sLine)
Loop Until sLine Is Nothing
oReader.Close()
oWrite.Close()
Problem now, I have a .doc file that I want to convert and saveas .txt format
How can I do similar like the above only applies to .doc format into .txt
format