Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old May 15th, 2006, 01:30 PM
Registered User
 
Join Date: May 2006
Location: , , Canada.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I got this working.If anyone still in need mail me

Eze
Reply With Quote
  #12 (permalink)  
Old May 17th, 2006, 02:14 PM
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What is your email address?

Quote:
quote:Originally posted by ezeoj
 I got this working.If anyone still in need mail me

Eze
Reply With Quote
  #13 (permalink)  
Old May 23rd, 2006, 10:37 AM
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

could you email it to me too.. or just simply post a reply here to help all those in need.

thank you very much

Reply With Quote
  #14 (permalink)  
Old August 25th, 2006, 06:45 AM
Registered User
 
Join Date: Aug 2006
Location: , , Denmark.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would also love to see a solution to this, Im fighting the exact same issue at the moment. Would somebody be so kind to post a solution, thanks a lot :)
Reply With Quote
  #15 (permalink)  
Old August 29th, 2006, 02:11 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes, need solution to 'Cannot create ActiveX component" error in .Net
thanks!

Reply With Quote
  #16 (permalink)  
Old September 12th, 2006, 08:54 AM
Registered User
 
Join Date: Sep 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by cdukes77@bellsouth.net
 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 (using Visual Studio .NET 2003) 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.Click
        REM Hello World
        REM Declare variable types (optional if Option Explicit is off).
        Dim myInDesign As InDesign.Application
        Dim myDocument As InDesign.Document
        Dim myPage As InDesign.Page
        Dim myTextFrame As InDesign.TextFrame
        REM End of variable type declarations
        myInDesign = CreateObject("InDesign.Application.CS")
        REM Create a new document
        myDocument = myInDesign.Documents.Add
        REM Get a reference to the first page
        myPage = myDocument.Pages.Item(1)
        REM Create a text frame
        myTextFrame = myDocument.TextFrames.Add
        REM Specify the size and shape of the text frame
        Dim AryStringArray() As String = {"0p0", "0p0", "18p0", "18p0"}
        myTextFrame.GeometricBounds = AryStringArray
        REM Enter text in the text frame
        myTextFrame.Contents = "Hello World!"
    End Sub
End Class

(I added the Interop.InDesign reference to my project)

I compile and run it ... no problem, everything works ... 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 System
Imports InDesign

Namespace WroxUnited
    Public Class Class1
        Public Sub New()
        End Sub
        Public Function runInDesign()
            REM Hello World
            REM Declare variable types (optional if Option Explicit is off).
            Dim myInDesign As InDesign.Application
            Dim myDocument As InDesign.Document
            Dim myPage As InDesign.Page
            Dim myTextFrame As InDesign.TextFrame
            REM End of variable type declarations
            myInDesign = CreateObject("InDesign.Application.CS")
            REM Create a new document
            myDocument = myInDesign.Documents.Add
            REM Get a reference to the first page
            myPage = myDocument.Pages.Item(1)
            REM Create a text frame
            myTextFrame = myDocument.TextFrames.Add
            REM Specify the size and shape of the text frame
            Dim AryStringArray() As String = {"0p0", "0p0", "18p0", "18p0"}
            myTextFrame.GeometricBounds = AryStringArray
            REM Enter text in the text frame
            myTextFrame.Contents = "Hello World!"
            Return "Done"
        End Function
    End Class
End Namespace


... 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.Click
        Dim ClassTest As New WroxUnited.Class1
        Dim lblMessage
        lblMessage = ClassTest.runInDesign
    End Sub


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?

I have gotten a hint that I may need to register an ActiveX object using the regsvr32.exe utility ... but the question is (if this is the answer) what ActiveX object.


hi,
from where i get the "Interop.InDesign" as a refrence in vb.net 2005.

Reply With Quote
  #17 (permalink)  
Old September 22nd, 2006, 06:03 PM
Registered User
 
Join Date: Sep 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by ezeoj
 I got this working.If anyone still in need mail me

Eze
please e-mail me the fix - shueyr@cableone.net

thanks

Reply With Quote
  #18 (permalink)  
Old November 8th, 2006, 03:17 AM
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexlai
Default

Quote:
quote:Originally posted by ezeoj
 I got this working.If anyone still in need mail me

Eze
Pls also email me the solution, thanks.
Reply With Quote
  #19 (permalink)  
Old January 16th, 2007, 09:27 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by ezeoj
 I got this working.If anyone still in need mail me

Eze
Reply With Quote
  #20 (permalink)  
Old January 24th, 2007, 12:47 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please send me the solution to this problem...

Thanks

Walaa

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX Component cannot create Object Madhivanan VB How-To 5 December 23rd, 2006 02:33 AM
ActiveX Component can't create an object lihar Access VBA 1 December 20th, 2006 07:52 AM
cannot create activex component - help please cobweb Classic ASP Components 1 September 14th, 2006 08:40 PM
Cannot create ActiveX Component Ron Howerton Pro VB.NET 2002/2003 0 July 18th, 2006 10:33 AM
ActiveX component can't create object lameneural Classic ASP Components 0 July 4th, 2006 12:14 AM



All times are GMT -4. The time now is 05:21 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.