K
Keld
im using Visual Studio Express to develop a application which handles word
documents.
The purpose is to read differents style tags in word doks and then transform
the dok to a webpage.
When im debugging in visual Studio express it works fine, but when im trying
to do it in irl(IIS) it fails.
The Code is a beneath and failes on oWordDoc.Activate because the oWordDoc
is Nothing ?
Dim missing As Object = System.Reflection.Missing.Value
Dim oWordApp As Word.ApplicationClass = New Word.ApplicationClass()
Dim readOnly1 As Object = False
Dim isVisible As Object = False
Dim OpenDoc As Object = My.Request.MapPath(CurrentDok)
My.Response.Write("Filen " & System.IO.File.Exists(OpenDoc) & "
Ek<br/>")
Dim oWordDoc As Word.Document = oWordApp.Documents.Open(OpenDoc,
missing, readOnly1, missing, missing, missing, missing, missing, missing,
missing, missing, isVisible, missing, missing, missing)
Dim TempFindText As String
Dim TempReplaceText As String
oWordDoc.Activate()
oWordApp.Selection.WholeStory()
documents.
The purpose is to read differents style tags in word doks and then transform
the dok to a webpage.
When im debugging in visual Studio express it works fine, but when im trying
to do it in irl(IIS) it fails.
The Code is a beneath and failes on oWordDoc.Activate because the oWordDoc
is Nothing ?
Dim missing As Object = System.Reflection.Missing.Value
Dim oWordApp As Word.ApplicationClass = New Word.ApplicationClass()
Dim readOnly1 As Object = False
Dim isVisible As Object = False
Dim OpenDoc As Object = My.Request.MapPath(CurrentDok)
My.Response.Write("Filen " & System.IO.File.Exists(OpenDoc) & "
Ek<br/>")
Dim oWordDoc As Word.Document = oWordApp.Documents.Open(OpenDoc,
missing, readOnly1, missing, missing, missing, missing, missing, missing,
missing, missing, isVisible, missing, missing, missing)
Dim TempFindText As String
Dim TempReplaceText As String
oWordDoc.Activate()
oWordApp.Selection.WholeStory()