Recording, running, and editing macros

In CorelDRAW, you can save time by automating a series of repetitive tasks with macros. A macro lets you record a sequence of actions so you can quickly repeat the actions later. Using a macro is similar to using a speed dialing feature on a phone. On many phones, you can set a frequently dialed number to a speed-dial button. Then, the next time you need to dial the number, you can save time by pressing the speed-dial button. Macros work in a similar way. You record the actions you want to repeat in a macro, then, when you need to repeat the actions, you run the macro.

Before recording a macro, make sure you know exactly which actions you want to record and the order in which you want to record them. Once you start recording, the macro recorder captures every change that you make in a drawing. For example, if you create a shape, resize the shape, and then change its color, the macro records all of the changes. When you are done making the changes, you must stop recording the macro. Then, when you want to repeat the changes, you run the macro.

You can record macros and save them for later use. You can also record temporary macros for actions that you need to repeat only a few times. A temporary macro is no longer accessible once a new temporary macro is recorded.

In addition, CorelDRAW includes several ready-made macros to help you create calendars, convert multiple files to a different file format, create color swatches, and insert page numbering.

You don’t need any programming experience to create macros. If, however, you have programming experience and you want to modify the macros, you can edit them using the Visual Basic for Applications (VBA) editor.

For more detailed instruction relating to VBA and its programming environment, consult the “Microsoft Visual Basic Help” from the Help menu in the Visual Basic Editor. For more information about working with VBA in CorelDRAW, see the CorelDRAW X4 VBA Help and the VBA Programming Guide, accessible from the CorelDRAW X4 VBA Help. To find out how to access the CorelDRAW X4 VBA help, see “To access the CorelDRAW X4 VBA Help.”


To record a macro

CorelDRAW btnbacktotop Recording, running, and editing macros
1.
 
Click Tools CorelDRAW onestep Recording, running, and editing macros Macros CorelDRAW onestep Recording, running, and editing macros Start recording.
2.
 
Type a name for the macro in the Macro name box.
3.
 
Perform the actions you want to record.
4.
 
Click Tools CorelDRAW onestep Recording, running, and editing macros Macros CorelDRAW onestep Recording, running, and editing macros Stop recording.

CorelDRAW note Recording, running, and editing macros

 
In CorelDRAW, some actions cannot be recorded in a macro. If, however, you attempt to record such an action, a comment line displays in the macro to indicate the unsupported action. You can view these comments when opening the macro in the VBA editor.

CorelDRAW tip Recording, running, and editing macros

 
You can also record a macro by clicking Tools CorelDRAW onestep Recording, running, and editing macros Undo, performing the actions you want to record in the drawing window and clicking the Save list to a VBA macro button in the Undo docker.

To run a macro

CorelDRAW btnbacktotop Recording, running, and editing macros
1.
 
Click Tools CorelDRAW onestep Recording, running, and editing macros Macros CorelDRAW onestep Recording, running, and editing macros Run macro.
2.
 
From the Macros in list box, choose a recorded macro.
3.
 
Click Run.

CorelDRAW note Recording, running, and editing macros

 
You can access a macro from either an open global macro storage (gms) file or an open document from the Macros in list box.

To run a CorelDRAW macro

CorelDRAW btnbacktotop Recording, running, and editing macros
1.
 
Click Tools CorelDRAW onestep Recording, running, and editing macros Macros CorelDRAW onestep Recording, running, and editing macros Run macro.
2.
 
From the Macros in list box, choose All standard projects.
3.
 
Choose any of the following macros included in CorelDRAW:
Wizard.CreateCalendar — lets you create custom single-page and multi-page calendars
Converter.Start — lets you convert multiple files to a different file format
CorelMacros.CreateColorSwatch — lets you generate rectangles filled with the colors included in a color palette that you choose
CorelMacros.PageNumbering — lets you insert page numbers in multi-page documents
4.
 
Click Run.

To record a temporary macro

CorelDRAW btnbacktotop Recording, running, and editing macros
1.
 
Click Tools CorelDRAW onestep Recording, running, and editing macros Macros CorelDRAW onestep Recording, running, and editing macros Record temporary macro.
2.
 
Perform the actions you want to record.
3.
 
Click Tools CorelDRAW onestep Recording, running, and editing macros Macros CorelDRAW onestep Recording, running, and editing macros Stop recording.

To run a temporary macro

CorelDRAW btnbacktotop Recording, running, and editing macros
 
Click Tools CorelDRAW onestep Recording, running, and editing macros Macros CorelDRAW onestep Recording, running, and editing macros Run temporary macro.

CorelDRAW note Recording, running, and editing macros

 
This option is enabled only when you record a temporary macro.

To edit a macro in the VBA editor

CorelDRAW btnbacktotop Recording, running, and editing macros
1.
 
Click Tools CorelDRAW onestep Recording, running, and editing macros Macros CorelDRAW onestep Recording, running, and editing macros Run macro.
2.
 
Choose the macro you want to edit.
3.
 
Click Edit.
4.
 
Use the Visual Basic Editor to edit the macro.

Recording, running, and editing macros