Operation Manual
How to run a macro
Although you can use Tools > Macros > Run Macro to run all macros, this is not efficient for
frequently run macros. See “Running a macro” on page 339 for more information.
A more common technique for frequently used macros is to assign the macro a toolbar icon, menu
item, keyboard shortcut, or a button embedded in a document. While choosing a method, it is also
good to ask questions such as:
• Should the macro be available for only one document, or globally for all documents?
• Is the macro for a specific document type, such as a Calc document?
• How frequently will the macro be used?
The answers will determine where to store the macro and how to make it available. For example,
you will probably not add a rarely used macro to a toolbar. To help determine your choices, see
Table 7.
Table 7. Methods for starting a macro
Type LibreOffice Document Type Document
Toolbar No Yes Yes
Menu No Yes Yes
Shortcut Yes Yes No
Event Yes No Yes
Toolbars, menu items and keyboard shortcuts
To add a menu item, keyboard shortcut, or toolbar icon that calls a macro, use the Customize
dialog (Figure 342). The Customize dialog contains pages to configure menus, keyboard shortcuts,
toolbars, and events. To open this dialog, go to Tools > Customize on the main menu bar or right-
click in an empty space on a toolbar and select Customize Toolbar from the context menu.
Complete coverage of the Customize dialog is beyond the scope of this chapter. Click the Help
button to access the help pages included with LibreOffice or see Chapter 14 Customizing
LibreOffice.
350 | Getting Started with LibreOffice 4.0