
Introduction
A macro is a saved sequence of commands or keystrokes that are stored for later use.
An example of a simple macro is one that “types” your address. The OpenOffice.org
(OOo) macro language is very flexible, allowing automation of both simple and
complex tasks. Macros are especially useful to repeat a task the same way over and
over again. This chapter briefly discusses common problems related to macro
programming using Calc.
Using the macro recorder
Chapter 13 of the Getting Started guide (Getting Started with Macros) provides a
basis for understanding the general macro capabilities in OpenOffice.org using the
macro recorder. An example is shown here without the explanations in the Getting
Started guide. The following steps create a macro that performs paste special with
multiply.
1) Open a new spreadsheet.
2) Enter numbers into a sheet.
Figure 304: Enter numbers
3) Select cell A3, which contains the number 3, and copy the value to the
clipboard.
4) Select the range A1:C3.
5) Use Tools > Macros > Record Macro to start the macro recorder. The
Record Macro dialog is displayed with a stop recording button.
Figure 305: Stop recording button
6) Use Edit > Paste Special to open the Paste Special dialog (Figure 306).
7) Set the operation to Multiply and click OK. The cells are now multiplied by 3
(Figure 307).
8) Click Stop Recording to stop the macro recorder. The OpenOffice.org Basic
Macros dialog (Figure 308) opens.
Chapter 12 Calc Macros 299
Comentarios a estos manuales