Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Can't able to Open Word File in Client Machine which is Stored in Server Machine

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

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadmin
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    V Senthil
    wrote on last edited by
    #1

    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. This is an intranet project. 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 giving link to 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. Thanks in advance Senthil V.

    P 1 Reply Last reply
    0
    • V V Senthil

      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. This is an intranet project. 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 giving link to 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. Thanks in advance Senthil V.

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      Maybe have a look at this: http://www.codeproject.com/aspnet/MS-Word_From_ASPNET.asp[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups