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 15-03-2004, 05:10
joexx
Guest
 
Posts: n/a
Default asign macro stored in a CDR file to toolbar icon

Hi,

how can I asign a macro stored in an cdr-file to a toolbar icon? Is it possible in CD11 or 12?
Reply With Quote
  #2  
Old 15-03-2004, 08:17
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: asign macro stored in a CDR file to toolbar icon

You can't. There are several reasons why this was not implemented. First, the macros in a document are not available when the document is closed, however the UI elements will stay on the screen. Second, in order to launch a macro, VBA needs the project, name, and macro name. Because all projects embedded in document have non-unique names by default (VBAProject), there is no way to distingush one project from another as far as running a macro is concerned.

Why do you have to put it in a document rather than in a GMS module?
Reply With Quote
  #3  
Old 15-03-2004, 09:11
joexx
Guest
 
Posts: n/a
Default

The reason is, the macro should easy be distibuted by copying the CDR file. I hoped it could be done like in Word.

Nevertheless thank you, Alex.
Reply With Quote
  #4  
Old 15-03-2004, 10:29
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

You can distribute your macro as easily by shipping a GMS module. Also you can plug application-specific event handlers such as new document created/opened/closed but the macro in a document can only receive events from that document.

I've been keeping promising people on creating an installer which would make other solution providers' life easier, and I'm still committed to it, however the time is an issue, as usual. :cry:
Reply With Quote
  #5  
Old 15-03-2004, 12:02
joexx
Guest
 
Posts: n/a
Default

I know this problem very well, Alex... :wink:
Thanks again.
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
delete vba project from cdr file hotairballoon CorelDRAW/Corel DESIGNER VBA 1 18-05-2005 09:08
Installer program; toolbar icon. narcix CorelDRAW/Corel DESIGNER VBA 1 12-05-2004 14:22
Assign macro to toolbar joexx Corel Photo-Paint VBA 6 03-02-2004 23:05
How to draw macro on toolbar? lywlywlywlywlyw Corel Photo-Paint VBA 2 04-04-2003 18:57


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


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