Ask a Question related to ASP.NET Web Services, Design and Development.
-
Chip Dukes #1
Problem ... cannot create ActiveX component
First, I'm a newbie to .Net ... Any help is appreciated
So I see that one of the applications I frequently use (Adobe InDesign) can be driven using VB ... I decide to try it out ... if this works, there are many day-to-day work flow problems that I can address. First I try creating a VB executable with a simple button ... the code behind the button is
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Clic
REM Hello Worl
REM Declare variable types (optional if Option Explicit is off)
Dim myInDesign As InDesign.Applicatio
Dim myDocument As InDesign.Documen
Dim myPage As InDesign.Pag
Dim myTextFrame As InDesign.TextFram
REM End of variable type declaration
myInDesign = CreateObject("InDesign.Application.CS"
REM Create a new documen
myDocument = myInDesign.Documents.Ad
REM Get a reference to the first pag
myPage = myDocument.Pages.Item(1
REM Create a text fram
myTextFrame = myDocument.TextFrames.Ad
REM Specify the size and shape of the text fram
Dim AryStringArray() As String = {"0p0", "0p0", "18p0", "18p0"
myTextFrame.GeometricBounds = AryStringArra
REM Enter text in the text fram
myTextFrame.Contents = "Hello World!
End Su
End Clas
(I added the Interop.InDesign reference to my project
I compile and run it ... no problem ... cool ... then I decide to try the same thing from an aspx page ..
First I tried something simple and just copied and pasted the code into a button placed on an aspx page ... result when I tried the page in my browser ... "Cannot create ActiveX component
I continued reading, and though nothing specifically said what the problem was I got the feeling there was a permission problem, someplace
So ... tried creating a VB class (see code below)
Imports Syste
Imports InDesig
Namespace WroxUnite
Public Class Class
Public Sub New(
End Su
Public Function runInDesign(
REM Hello Worl
REM Declare variable types (optional if Option Explicit is off)
Dim myInDesign As InDesign.Applicatio
Dim myDocument As InDesign.Documen
Dim myPage As InDesign.Pag
Dim myTextFrame As InDesign.TextFram
REM End of variable type declaration
myInDesign = CreateObject("InDesign.Application.CS"
REM Create a new documen
myDocument = myInDesign.Documents.Ad
REM Get a reference to the first pag
myPage = myDocument.Pages.Item(1
REM Create a text fram
myTextFrame = myDocument.TextFrames.Ad
REM Specify the size and shape of the text fram
Dim AryStringArray() As String = {"0p0", "0p0", "18p0", "18p0"
myTextFrame.GeometricBounds = AryStringArra
REM Enter text in the text fram
myTextFrame.Contents = "Hello World!
Return "Done
End Functio
End Clas
End Namespac
.... then calling the VB class from the button (see code below)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Clic
Dim ClassTest As New WroxUnited.Class
Dim lblMessag
lblMessage = ClassTest.runInDesig
End Su
Result when I tried to test ... ... "Cannot create ActiveX component " ..
Kept reading ... found a reference that indicated that the ASPNET user account might need to be given Administrator rights ..
tried that ... same result ..
I'm obviously missing something here, but I seem to see variants of the question from several other people. Any ideas
Chip Dukes Guest
-
Cannot create ActiveX component
Hi, Im doing an application which should convert a pdf to an image. I have this code which gives me a runtime error. pdfDoc =... -
ActiveX component can’t create object‘AcroExch.App’
I have the same problem. With only Adobe Acrobat 5.0 installed all works fine, then I have installed the Acrobat Reader 8.0 and now with the reader... -
Cannot Create Activex Component ASP.net
Hi, I am running the following code in an ASP.NET web application using VB.NET Gapp= createobject(AcroExch.app) I get the following error at... -
ActiveX component can't create object
I'm having problems setting up a monstrous COM+ Frankenapp on my local machine. The application works on the development server when I access it... -
ActiveX cannot create object component -HelpPlease
Hi, I tried to open an Access application that I developed moths ago but I keep getting the error while trying to link the front-end to the...



Reply With Quote

