Word Application

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()
 
K

Keld

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 ?
 
M

Mark Rae [MVP]

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*...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top