The guide linked below provides an introduction to programming with OpenOffice.org Basic. It includes examples to help you quickly develop your own OpenOffice.org Basic programs. It is recommended in the preface that you have a familiarity with other programming languages, however it does start with some very basic examples, so anyone familiar with writing macros in MS Office or other suites should be OK.
From the guide:
“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.”
A sample of the table of contents is as follows.