About OpenOffice.org Basic

The OpenOffice.org Basic programming language has been developed especially for OpenOffice.org and is firmly integrated in the Office package.

As the name suggests, OpenOffice.org Basic is a programming language from the Basic family. Anyone who has previously worked with other Basic languages — in particular with Visual Basic or Visual Basic for Applications (VBA) from Microsoft — will quickly become accustomed to OpenOffice.org Basic. Large sections of the basic constructs of OpenOffice.org Basic are compatible with Visual Basic.

The OpenOffice.org Basic programming language can be divided into four components:

The language of OpenOffice.org Basic: Defines the elementary linguistic constructs, for example, for variable declarations, loops, and functions.

The runtime library: Provides standard functions which have no direct reference to OpenOffice.org, for example, functions for editing numbers, strings, date values, and files.

The OpenOffice.org API (Application Programming Interface): Permits access to OpenOffice.org documents and allows these to be created, saved, modified, and printed.

The Dialog Editor: Creates personal dialog windows and provides scope for the adding of control elements and event handlers.

VBA : Compatibility between OpenOffice.org Basic and VBA relates to the OpenOffice.org Basic language as well as the runtime library. The OpenOffice.org API and the Dialog Editor are not compatible with VBA (standardizing these interfaces would have made many of the concepts provided in OpenOffice.org impossible).

Intended Users of OpenOffice.org Basic

The scope of application for OpenOffice.org Basic begins where the standard functions of OpenOffice.org end. Routine tasks can therefore be automated in OpenOffice.org Basic, links can be made to other programs — for example to a database server — and complex activities can be performed at the press of a button by using predefined scripts.

Use of OpenOffice.org Basic

OpenOffice.org Basic can be used by any OpenOffice.org user without any additional programs or aids. Even in the standard installation, OpenOffice.org Basic has all the components needed to create its own Basic macros, including:

The integrated development environment (IDE) which provides an editor for creating and testing macros.

The interpreter, which is needed to run OpenOffice.org Basic macros.

The interfaces to various OpenOffice.org applications, which allow for direct access to Office documents.

More Information

The components of the OpenOffice.org API that are discussed in this guide were selected based on their practical benefits for the OpenOffice.org Basic programmer. In general, only parts of the interfaces are discussed. For a more detailed picture, see the API reference.

The Developer's Guide describes the OpenOffice.org API in more detail than this guide, but is primarily intended for Java and C++ programmers. Anyone who is already familiar with OpenOffice.org Basic programming can find additional information in the Developer's Guide on OpenOffice.org Basic and OpenOffice.org programming.

Programmers who want to work directly with Java or C++ rather than OpenOffice.org Basic should consult the OpenOffice.org Developer's Guide instead of this guide. OpenOffice.org programming with Java or C++ is a considerably more complex process than programming with OpenOffice.org Basic.