Creating Basic Macros in OpenOffice



The OpenOffice productivity suite can use a variety of scripts and macros to automate recurring tasks. The easiest approach is to use the integrated Basic dialect. This article helps you get started with this surprisingly sophisticated programming language.

If you find yourself repeating complex, multi-step tasks in OpenOffice [1], it may be time to create a macro. OpenOffice supports a variety of programming options. Version 1.1 introduced the concept of bridges, which allow users to add their own C, C++, Java, or Python programs. In version 2.0, which is due for release any time now, the basic OpenOffice package will also support the Common Language Interface (CLI), which allows users to add their own Javascript and C# programs. Of all the languages used with OpenOffice, Basic is perhaps the easiest option. This article describes how to get started with creating macros in Basic. Getting Started Basic programming starts in the Tools | Macros menu, which has two entries: Record macro, a macro recorder for interactive use, and Macro..., which opens a new window (Figure 1).