I am having problems with ms word and asp.net and I am not sure how to
correct it. Below is some of my code. When the code hits the
wdApp.Documents.Open(sSourcePath) line of code it errors out with a
System.NullReferenceException: Object reference not set to an instance of
an object
Please help
Imports Word.DocumentClass
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
GetDocument("C:\Documents\test.doc")
End Sub
Public Function GetDocument(ByVal sSourcePath) As String
Dim wdApp As Word.Application
Dim arrTags() As String
Dim arrValues() As String
Dim iLoop As Integer
wdApp.Documents.Open(sSourcePath)
End Function