Figure 325: Assign macro to an application level event
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 326).
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 327). 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.
388 Getting Started with OpenOffice.org 3
Comments to this Manuals