starting word from asp.net

G

Guest

I am trying to load Word Object to do some VBA automation within my ASP.NET
webservice. I understand it is not recommended but it will only ocassionally
used. I am not able to create the object. I get the following error
System.Exception occurred in Microsoft.VisualBasic.CreateObject
Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String
ServerName)

I am working on WIndows XP machine.

The webconfig for asp.net app is:
"
<authentication mode="Windows" />
<identity impersonate="true" />
<deny users="?" />
<allow users="*" /> <!-- Allow all users -->
"

IIS directery has security set at low and all read/write/ execute options
enabled. The code works fine in a VB form. Also I am able to load an excel
application without any problems. It is not a registeration issue since I get
the same problem on other machines too.


The code snippet:
"
Imports System.Runtime.InteropServices.Marshal

Public Class TWordObj
Public Sub CreateLabels()

Dim oApp As Word.Application
Dim oDoc As Word.Document

'Start a new document in Word
oApp = CType(CreateObject("Word.Application"), Word.Application)
oDoc = oApp.Documents.Add
"


Any help will be apreciated.
Was this post helpful to you?

Why should I rate a post?
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top