![]() |
#1
|
|||
|
|||
![]()
How to run a macro at startup with Corel 12 ?
|
#2
|
||||
|
||||
![]() Quote:
![]() What you need to do is: 1. Start VBA editor by hitting Alt-F11 in CorelDRAW. 2. On the left hand side you'll see project explorer window. Locate "GlobalMacros (GlobalMacros.gms)" module. 3. Expand it until you see ThisMacroStorage under CorelDRAW 12 Objects. 4. Double-click on the ThisMacroStorage item and this will bring up the code window on the left (see the first picture in the attachment). 5. On top of the code window you'll see two list boxes. From the left list select "GlobalMacroStorage" (see Pic 2). 6. In the right list select "Start" event (see Pic 3). 7. This will add a new even handler for application Start event which is called when the application launches. (see Pic 4). 8. Add some code to that even handler. I added just a message box to indicate when the event is called (Pic 5). 9. Now to ensure that the even is called as soon as CorelDRAW starts, you need to make sure VBA is initialized at startup (which is not the default behavior). Go to Tools>Options>Workspace>VBA and at the bottom of the dialog, remove the checkbox from "Delay Load VBA". (Pic 6) Now you should be all set. Last edited by Alex; 07-11-2006 at 09:39. |
#3
|
|||
|
|||
![]()
I have been performed all step but not still run
![]() |
#4
|
||||
|
||||
![]() Quote:
Apart from this, I don't know why it doesn't work on your system. It works here on my CorelDRAW 12. |
#5
|
|||
|
|||
![]()
Ya, It is run very good but how to third button is not depressed automatic ?
|
#6
|
||||
|
||||
![]() Quote:
This setting is stored in registry in the following key: HKEY_CURRENT_USER\Software\Corel\CorelDRAW\12.0\CorelDRAW\Application Preferences\VBA - Global Document > DesignMode |
#7
|
|||
|
|||
![]()
Yeah, very good, tnx Alx
|
#8
|
|||
|
|||
![]()
I am using 11 and am trying to set up a macro to run automatically when a specific file is opened. I followed these instructions and under GlobalMacros, CorelDRAW11 Objects, ThisDocument I put the following code:
Private Sub GlobalDocument_Start() Print_form.Show End Sub Then when I try to open the file I get an error message that "Cannot find file or one of its components, etc." I click OK and the form opens, but Corel is not. If I then close the form, Corel then opens to the file. What am I doing wrong? |
#9
|
|||
|
|||
![]()
Alex I added your example of Active Page, and now I don't know how to erase it.
Best regards Michael Cervantes |
![]() |
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 |
run a macro at startup with Corel 12 ? | beny04 | CorelDRAW/Corel DESIGNER VBA | 2 | 26-04-2005 14:57 |
run macro at start up Corel 11 ???? | -=HKLC=- | CorelDRAW/Corel DESIGNER VBA | 14 | 30-10-2004 09:29 |
Run my add-in on startup Corel. | drg | CorelDRAW/Corel DESIGNER VBA | 5 | 16-09-2004 10:38 |
Corel 11 Macro | arollgen | CorelDRAW/Corel DESIGNER VBA | 1 | 17-08-2004 16:10 |
New macro to clip curves w.r.t. a border | Gerard Hermans | Macros/Add-ons | 0 | 09-06-2003 07:50 |