0
Answer

Can't able to Open Word File in Client Machine which is Stored in Server Machine

Hi,

Im having word document in the Server Machine. While im trying to open the file in Client Machine file is opening in Server only. I need to open in the client only. This is an ASP.NET project done in VB.NET.

The Code i used to Open the file
---------------------------------------------
Dim oWordApplic As New Word.ApplicationClass
Dim oDoc As Word.Document
Dim strFileName As String = ConfigurationSettings.AppSettings("ServerWordDocu") + ReportName + ".doc"
Dim fileName As String = strFileName
oWordApplic.Visible = True
oDoc = oWordApplic.Documents.Open(fileName)
oDoc.Activate()
----------------------------------------------------------------

Another Code I Used is Hyperlink. Just i give the link to hyperlink but its opening in readonly format. so i cant able to do any modification. Because i have to save the file in the server.

HyperLink1.Text = Name + ".doc"
HyperLink1.NavigateUrl = ConfigurationSettings.AppSettings("WordDocu") + Name + ".doc"
----------------------------------------------------------------

Another type i Checked its also opening in readonly.

Dim filename As String = ConfigurationSettings.AppSettings("WordDocu") + ReportName + ".doc"
Response.ContentType = "application/ms-word"
Response.AddHeader("ContentDisposition", "attachment;filename")
Response.WriteFile(filename)


Give me the solution i need it very urgent to implement in project.

Thanks in advance
Senthil V.