
Downloading macros to import
Macros are available for download. Some macros are contained in
documents, some as regular files that you must select and import, and
some as macro text that should be copied and pasted into the Basic
IDE; use Tools > Macros > Organize Macros > OpenOffice.org
Basic to open the OpenOffice.org Macros dialog, choose the macro to
edit, and then click Edit to open the macro in the Basic IDE.
Some macros are available as free downloads on the Internet (see
Table 3).
Table 3. Places to find macro examples
Location Description
http://www.ooomacros.org/ Excellent collection of packaged
macros.
http://www.pitonyak.org/oo.php Reference materials regarding macros.
http://www.pitonyak.org/database/ Reference materials regarding
database macros.
http://development.openoffice.org/ Lots of links to everything.
http://www.oooforum.org/ Many examples and help.
How to run a macro
A typical method to run a macro is as follows:
1) Use Tools > Macros > Run Macro to open the Macro Selector
dialog (see Figure 309).
2) Select the library and module in the Library list (left hand side).
3) Select the macro in the Macro name list (right hand side).
4) Click Run to run the macro.
Although you can use Tools > Macros > Run Macro to run all
macros, this is not efficient for frequently run macros. A more common
technique is to assign a macro to a toolbar button, 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?
• Does the macro pertain to a specific document type, such as a
Calc document?
• How frequently will the macro be used?
Chapter 13 Getting Started with Macros 395
Comentarios a estos manuales