Word Application

  • Thread starter Thread starter Keld
  • Start date Start date
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()
 
Why are they then making Primary Interop Assembly(PIA) and why does the code
work when im using the built in iis from Visual Studio Express ?
 
Why are they then making Primary Interop Assembly(PIA)

For *desktop* Office automation...
and why does the code work when im using the built in iis from Visual
Studio Express ?

Because everything is running on your *desktop*...
 
Back
Top