Operation Manual
b) Select Replace existing libraries if the library you want to import has the same name
and you want to replace the existing library.
c) Select Insert as reference if you want to use the library as reference, but not import the
library into your document. When a library is used as a reference, it remains in its
current location and is read only.
5) Click OK to import the macro library you selected.
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. See “Adding a macro” on page 342 on how to add macros to your macro library
and “Viewing and editing macros” on page 346 on how to edit macros using the Basic IDE.
Some macros are available as free downloads on the Internet (see Table 7).
Table 7. Macro examples
Location Description
http://www.pitonyak.org/oo.php Reference materials regarding macros.
http://www.pitonyak.org/database/ Reference materials regarding database macros.
https://wiki.documentfoundation.org/Macros Lots of links to macros.
http://en.libreofficeforum.org/
http://forum.openoffice.org/en/forum/
Forums, with many examples and help.
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 345 for more information.
A more common technique for frequently used macros is to link the macro to 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 8.
Table 8. 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
356 | Getting Started with LibreOffice 5.0