How to use Document Events in CorelDRAW X8.

If I try to use a document event but it works only in Untitled ones. After save, when I reopen it I am asked about enabling macros, I press Enable but nothing happens. Any of its events do not work. In IDE the name of the file does not appears in parenthesis after VBAProject (in case of events existing)... It looks it is hidden. I mean enumerating VBAProjects in VBA, its name appears like being a VBProject.

Is that a general problem of X8 (maybe a strange security one...) or only my installation has a problem?

Is it something to be done in order to activate events?

I tried some workaround which works but also in strange circumstances. I use a reference at 'Microsoft Visual Basic for Applications Extensibility 5.3' and that gives me the possibility to programmatic copy an event from a document/GSM to another document. When that document does not have a path (type Untitled) it works. If I save it all event code stays there but stops working. If I copy such an event in a document (saved) not having VBProject (not any VBA) it is not working, too.

Another annoying issue is the next:

  If you save a document having an event code and after that you delete that code, somehow some VBA garbage remains inside that document. When I open it I am prompt about macro Enabling, even if not a line of VBA code exists any more. On top of that, if you have a big document with more then 100 pages, that in-existing VBA project (garbage) loads first and the document itself loads only after that. You cannot see the message asking about Enabling macro. If you call a function from a button outside VBE, CorelDRAW crashes...   In such cases I learned it is necessary to play with Ctrl + Tab until I find the message about macro Enabling and press one of its buttons. Otherwise corelDRAW crashes...

Is there a way to clean the document of its VBA garbage in order not to be prompted regarding macro enabling?

Thanks in advance!

P.S. Any idea about whatever issue presented here will be well appreciated, even strange approach will be presented...

Parents Reply Children
No Data