Operation Manual

Table Of Contents
686 | Corel DESIGNER X7 User Guide
To use VSTA macro features with Corel DESIGNER, you must have Microsoft Visual Studio 2012 or later installed.
If you install Microsoft Visual Studio after installing CorelDRAW Graphics Suite, you must re-install the VSTA macro features by
modifying your CorelDRAW Graphics Suite installation. For more information, see “To manually install the macro features” on page
687.
The macro features provide several tools for working with macros in the main application window:
Macros toolbar — provides easy access to common macro functions
Macro Manager docker — provides easy access to all available macro projects for VBA, and to basic functions for working with those
projects
Macro Editor (formerly the Visual Basic Editor) — provides advanced functions for creating VBA-based macro projects
VSTA Editor — provides advanced functions for creating VSTA-based macro projects. The VSTA Editor is accessible only if you have
Microsoft Visual Studio 2012 or later installed.
Creating macros
Macros are stored in modules (also called “code modules”), which are stored in macro projects. The Macro Manager docker lets you view
and manage all of the macro projects, modules, and macros that are available to you.
You can use the Macro Manager docker to create macro projects in the form of Global Macro Storage (GMS) files or Corel VSTA Projects
(CGSaddon). Using such files is an excellent way to bundle the components of your macro project for sharing with others. You can use the
Macro Manager docker to open (or “load”) the macro projects that you create, as well as the macro projects that install with the software
or that are otherwise made available to you. You can also use the Macro Manager docker to rename macro projects, as well as to copy and
close (or “unload”) GMS-based and VSTA macro projects.
Some macro projects are locked and cannot be modified.
When you create a document, a macro project for that document is automatically added to the Macro Manager docker. Although
you can store macros within the macro project for a document — for example, to create an all-in-one template — it is recommended
that you instead use GMS files to store your macro projects.
Each macro project contains at least one module. You can use the Macro Manager docker to add a module to a VBA-based macro project,
or to open existing modules for editing. You can also use the Macro Manager docker to rename or delete VBA modules.
The editing feature is disabled for some modules.
Finally, you can use the Macro Manager docker to create macros within the available modules. You don’t need any programming experience
to create macros; however, if you have programming experience and want to edit VBA macros, you can do so by using the Macro Editor. You
can also use the Macro Manager docker to rename and delete VBA macros.
Corel DESIGNER includes sample macros, which supply additional functionality, demonstrate automation in the software, and provide
sample code. For information on these sample macros, please see the Corel DESIGNER Macros Help file (draw_om.chm, which is
located in the Data folder for the installed software).
Recording macros
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 accessible until a new
temporary macro is recorded.