![]() |
#1
|
|||
|
|||
![]()
Hi! On this:
Code:
Dim doc As Document -------------------------------------------- Set doc = CorelDRAW.ActiveDocument Run-time error '-2147467259 (80004005)' There is no active document. Whats wrong? Thanks |
#2
|
||||
|
||||
![]()
Check your task manager and make sure another copy of CorelDRAW is not running in the backgound. It seems that your program connects to the wrong instance of CorelDRAW.
Shut down all CorelDRAW instances, then start one manually and create a document. It should work now. Earlier versions did not always shot down properly after using certain VBA features, so you should check your task list often... Let me know how it goes. |
#3
|
|||
|
|||
![]()
Thanks for your message
I try use this, but still get message I wrote Maybe I wrong declare reference on Active Document If I use Code:
AppActivate "CorelDraw9" Code:
Set doc = CorelDraw.ActiveDocument doc.Unit = cdrMillimeter lngGetUserClick = CorelDraw.CorelScript.GetUserClick(lngXCoord, lngYCoord, lngTimeOut, -1) blnSelectObjectAtPoint = CorelDraw.CorelScript.SelectObjectAtPoint(lngXCoord, lngYCoord, 0) |
![]() |
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 |
Attributes in Corel Draw | dueless | CorelDRAW/Corel DESIGNER VBA | 8 | 09-01-2008 06:56 |
Corel Draw 13 | Anonymous | General | 3 | 06-09-2005 10:34 |
Kerning of Corel Draw fonts | knight74 | CorelDRAW/Corel DESIGNER VBA | 1 | 30-01-2004 14:34 |
takes Draw a long time to start a new document! | bbolte | CorelDRAW/Corel DESIGNER VBA | 5 | 14-05-2003 09:09 |
Active document issues.. | wbochar | CorelDRAW/Corel DESIGNER VBA | 2 | 19-03-2003 15:15 |