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 16-04-2004, 08:45
korner
Guest
 
Posts: n/a
Default Corel Draw 9 Active Document

Hi! On this:
Code:
Dim doc As Document
--------------------------------------------
Set doc = CorelDRAW.ActiveDocument
I get :
Run-time error '-2147467259 (80004005)'
There is no active document.

Whats wrong?
Thanks
Reply With Quote
  #2  
Old 16-04-2004, 09:43
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default Re: Corel Draw 9 Active Document

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.
Reply With Quote
  #3  
Old 17-04-2004, 02:46
korner
Guest
 
Posts: n/a
Default Corel Draw 9 Active Document

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"
and them
Code:
Set doc = CorelDraw.ActiveDocument
doc.Unit = cdrMillimeter
lngGetUserClick = CorelDraw.CorelScript.GetUserClick(lngXCoord, lngYCoord, lngTimeOut, -1)
blnSelectObjectAtPoint = CorelDraw.CorelScript.SelectObjectAtPoint(lngXCoord, lngYCoord, 0)
looks like a have a error. But where?
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
Attributes in Corel Draw dueless CorelDRAW/Corel DESIGNER VBA 8 09-01-2008 07:56
Corel Draw 13 Anonymous General 3 06-09-2005 11:34
Kerning of Corel Draw fonts knight74 CorelDRAW/Corel DESIGNER VBA 1 30-01-2004 15:34
takes Draw a long time to start a new document! bbolte CorelDRAW/Corel DESIGNER VBA 5 14-05-2003 10:09
Active document issues.. wbochar CorelDRAW/Corel DESIGNER VBA 2 19-03-2003 16:15


All times are GMT -5. The time now is 04:15.


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