urgent need for open an XML with word2003
Hi, I really need some help: The problem is I need to load an xml file into Memory and do search/replace some text in it. after that, I have to spit it out to the browser. I want to open the xml file with word2003. so mostly my file is text but I will save it as an XML file.
Here the code but there are some problem in it. does anybody have any idea? I know that should be an sting at the end.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim s, k As String
Dim xml As New XmlDocument()
Dim oStream As filestream
Dim ds As New DataSet()
Dim filesize As Integer
Dim ds1 As DataSet
Response.Expires = 0
Response.BufferOutput = False
Response.ContentType = "application/MSword"
oStream = New FileStream(Server.MapPath("test.xml"), FileMode.Open, FileAccess.Read)
filesize = oStream.Length
Dim Buffer(CInt(filesize)) As Byte
s = Replace(ds.GetXml, "test", "test1")