Getting Started Guide

Every library container contains a library named Standard. It is better to create your
own libraries with meaningful names than to use the Standard library. Not only are
meaningful names easier to manage, but they can also be imported into other library
containers whereas the Standard library cannot.
Caution
OpenOffice.org allows you to import libraries into a library container,
but it will not allow you to overwrite the library named Standard.
Therefore, if you store your macros in the Standard library, you
cannot import them into another library container.
Just as it makes good sense to give your libraries meaningful names, it is prudent to
use meaningful names for your modules. By default, OpenOffice.org uses names such
as Module1. Feel free to use your own meaningful name.
As you create your macros, you must decide where to store them. Storing a macro in
a document is useful if the document will be shared and you want the macro to be
included with the document. Macros stored in the application library container
named My Macros, however, are globally available to all documents.
Macros are not available until the library that contains them is loaded. The Standard
library and Template library, however, are automatically loaded. A loaded library is
displayed differently from a library that is not loaded. To load the library and the
modules it contains, double-click on the library.
Where are macros stored?
OpenOffice.org stores user-specific data in a directory under the user’s home
directory. The location is operating system specific. Use Tools > Options >
OpenOffice.org > Paths to view where other configuration data is stored. On
Windows XP, this is C:\Documents and Settings\<name>\Application Data. User
macros are stored in OpenOffice.org\3\user\basic. Each library is stored in its own
directory off the basic directory.
It is not important to understand where macros are stored for casual use. If you know
where they are stored, however, you can create a backup, share your macros, or
inspect them if there is an error.
Use Tools > Macros > Organize Dialogs to open the OpenOffice.org Macro
Organizer dialog. Another common way to open this dialog is to use Tools > Macros
> Organize Macros > OpenOffice.org Basic to open the OpenOffice.org Macros
dialog and then click the Organizer button.
Chapter 13 Getting Started with Macros 335