OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 26-03-2008, 18:27
sjs
Guest
 
Posts: n/a
Default C# ApplicationObject.CreateDocument() Fails

When trying to create a CorelDraw 12 document within a C# windows forms application, I receive the following error:

Error HRESULT E_FAIL has been returned from a call to a COM component.

I've added the references to CorelDraw12 and VGCore. A code sample is listed below ...

try
{
CorelDRAW.Application draw = new CorelDRAW.Application();
draw.Visible = true;
CorelDRAW.Document doc = draw.CreateDocument();
CorelDRAW.Shape rect = doc.ActiveLayer.CreateRectangle2(0, 0, 2, 2, 0, 0, 0, 0);
rect.Fill.UniformColor.RGBAssign(255, 0, 0);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);

}


I'm using Visual Studio 2008 Pro, CorelDraw 12 & Windows XP SP2.

Any help would be greatly appreciated,

Steve
Reply With Quote
  #2  
Old 31-03-2008, 14:08
sjs
Guest
 
Posts: n/a
Default Problem solved

The issue was machine specific.

Steve
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
forum fails in sending notification s_federici Web site suggestions 2 08-11-2004 03:47


All times are GMT -5. The time now is 22:49.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com