Open a word document from a webpage
Posted on 2013-11-27
I'm using asp.net in Visual Studios 2010 with vb.net code behind my webpage. I have code to open a word document (.docm) when the user clicks the submit button. I then update/populate the word document and save it to a shared drive location. In testing the code works and on my development site it seemed to work. The word document opens on the server side.
However, I want the document to open on the client side and not the server side so the user can see it. Is there away to do that?
Dim oWord As Word.Application
Dim oDoc As Word.Document
Dim oTable As Word.Table
Dim keys(1) As System.Data.DataColumn
Dim nRows As Integer
Dim nCols As Integer
keys(0) = detailTable.Columns("ROW_NO")
detailTable.PrimaryKey = keys
'Dim oChkBox As Word.CheckBox
'Start Word and open the document template.
oWord = CreateObject("Word.Application")
oWord.Visible = False
oDoc = oWord.Documents.Add(GetSafetyInspTemplate())
'GetSafetyInspTemplate() 'retunrs the word document with full path and filename
oTable = oDoc.Tables(3)
'code to populate the document