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