
A common use is to assign the Open Document event to call a specific
macro. The macro then performs certain setup tasks for the document.
Select the desired event and click the Macro button to open the Macro
Selector dialog (see Figure 312).
Select the desired macro and click OK to assign the macro to the
event. The Events tab shows that the event has been assigned to a
macro (see Figure 313). When the document opens, the PrintHello
macro is run.
Many objects in a document can be set to call macros when events
occur. The most common usage is to add a control, such as a button,
into a document. Even double-clicking on a graphic opens a dialog with
a Macros tab that allows you to assign a macro to an event.
Figure 312: Assign macro to the document open event
Figure 313: PrintHello is assigned to the Open Document event
Chapter 13 Getting Started with Macros 399
Kommentare zu diesen Handbüchern