 |
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 15th, 2006, 01:30 PM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I got this working.If anyone still in need mail me
Eze
|
|

May 17th, 2006, 02:14 PM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
What is your email address?
Quote:
quote:Originally posted by ezeoj
I got this working.If anyone still in need mail me
Eze
|
|
|

May 23rd, 2006, 10:37 AM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
could you email it to me too.. or just simply post a reply here to help all those in need.
thank you very much
|
|

August 25th, 2006, 06:45 AM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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 :)
|
|

August 29th, 2006, 02:11 PM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
yes, need solution to 'Cannot create ActiveX component" error in .Net
thanks!
|
|

September 12th, 2006, 08:54 AM
|
|
Registered User
|
|
Join Date: Sep 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by [email protected]
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.
|
|

September 22nd, 2006, 06:03 PM
|
|
Registered User
|
|
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by ezeoj
I got this working.If anyone still in need mail me
Eze
|
please e-mail me the fix - [email protected]
thanks
|
|

November 8th, 2006, 03:17 AM
|
|
Registered User
|
|
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

January 16th, 2007, 09:27 PM
|
|
Registered User
|
|
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by ezeoj
I got this working.If anyone still in need mail me
Eze
|
|
|

January 24th, 2007, 12:47 PM
|
|
Registered User
|
|
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Please send me the solution to this problem...
Thanks
Walaa
|
|
 |