Corel
Table of Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . 1
What's the purpose of this guide? . . . . . . . . . . . . . . . . . . . . . . . 1 Who should use this guide? . . . . . .. . . . . . . . . . . . . . . . . . . 1 How to use this guide . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 About CorelDRAW . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 About VBA in CorelDRAW . . . . . . . . . . . . . . . . . . . . . . . . . 1
About Corel Corporation . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Writing and running macros in CorelDRAW .
TheVBA toolbar in CorelDRAW
.
.
.
.
.
.
.
.
.
.
.
.
.
3
Installing VBA for CorelDRAW . . . . . . . . . . . . . . . . . . . . . . . . 3 . . . . . . . . . . . . . . . . . . . . . . . 3
Writing a macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Writing macros in the VB Editor . . . . . . . . . . . . . . . . . . . . . . . 4 Recording macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Running a macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Introducing automation and VBA
VBA for non-programmers
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6
What is automation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 . . . . . . . . . . . . . . . . . . . . .. . . . 6
VBA for programmers . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 The main features of VBA structure and syntax . . . . . . . . . . . . . . . . . . . 7 Comparing VBA to other programming languages . . . . . . . . . . . . . . . . . 12
Visual Basic Editor .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
14
Starting theVisual Basic Editor from CorelDRAW . . . . . . . . . . . . . . . . . 14
CorelDRAW Graphics Suite 12 Programming Guide for VBA
i
Visual Basic Editor user interface . . . . . . . . . . . . . . . . . . . . . . . 14 Project Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Properties Window . . . . . .. . . . . . . . . . . . . . . . . . . . . 17 Code window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Form Designer window . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Object Browser window. . . . . . . . . . . . . . . . . . . . . . . . . . 26 Debugging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
About objects and object models
.
.
.
....
Regístrate para leer el documento completo.