![]() |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hey guys, I've finally found my way back here after a long break (and oddly I've had to reregister) - took me a while to remember the web address, but I'm glad I did.
I'm attempting to write a program that, among other things, opens CorelDraw12, opens some files then resaves/exports them in a different format. My issue is, how do I launch CorelDraw12 AND gain access to it through my C# code? So far I've added reference to the 'Corel - CorelDRAW 12.0 Library' COM component and have attempted the following code: Code:
CorelDRAW.ApplicationClass Draw = new CorelDRAW.ApplicationClass(); Code:
CorelDRAW.Application Draw = new CorelDRAW.Application(); Code:
CorelDRAW.Application Draw = new CorelDRAW.ApplicationClass(); ![]() Unable to cast COM object of type 'CorelDRAW.ApplicationClass' to interface type 'CorelDRAW.IDrawApplication'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{398C0002-8D24-11D2-89E7-0000861EBBD6}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). Can anyone offer me any assistance? Thanks a lot for your time! |
#2
|
|||
|
|||
![]()
I have also attempted
Code:
CorelDRAW.Application Draw = new CorelDRAW.ApplicationClass(); I'm guessing this could be a more general problem, but I haven't had any luck with google - if anyone can give me a tip what to search for that would also be helpful. |
#3
|
|||
|
|||
![]()
Hey again guys, I posted over at the CorelDraw forums and managed to get a solution that I thought I would share.
The test code I used was: Code:
CorelDRAW.Application Draw = new CorelDRAW.Application(); Draw.Visible = true; Draw.CreateDocument(); Draw.ActiveLayer.CreateEllipse(0, 0, 10, 10, 90, 90, false); After this, the code ran successfuly. Hopefully this solution helps others in the future. I'm no good with wikis, but if someone could post this in the dev wiki I think it would be a useful addition. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
draw12... Accessing windows explorer | xombie | CorelDRAW/Corel DESIGNER VBA | 2 | 06-07-2006 12:48 |
Has anybody has this message ever? A problem occurred accessing memory. | mecanomaniaco | Corel Photo-Paint VBA | 0 | 18-05-2006 11:06 |
Accessing .Cost & .Comments in Object Data | ghamor | CorelDRAW/Corel DESIGNER VBA | 2 | 06-03-2006 10:50 |
How can I put Windows Calculator to CorelDraw12 toolbar | Vlada | General | 2 | 14-02-2006 12:06 |
Need help accessing objects in a group | ama | CorelDRAW/Corel DESIGNER VBA | 5 | 20-02-2004 11:28 |