I checked out these sites and came up with the following code and I am
getting a "Cannot create ActiveX Component" error message when I select the
button; and it's failing on "oword = CreateObject("Word.Application")". Also,
I did add the reference to the word object as the examples showed. Thanks
agian for your help.
************************************************** *****
Imports word = Microsoft.Office.Interop.Word
Public Class proddocs
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
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
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim oword As word.ApplicationClass
oword = CreateObject("Word.Application")
oword.Visible = True
oword.Documents.Open("c:\jason.doc")
oword.Activate()
End Sub
End Class
************************************************** *****
"pa***********@web.de" wrote:
here are some links to get you started. You may also want to google for
"office or word automation "
http://msdn.microsoft.com/library/de..._ancoffsol.asp
http://support.microsoft.com/?kbid=316384
http://support.microsoft.com/kb/302902/