Book Code & Other Resources

This is the code utilized in the various sample/code listings throughout the book as well as other resources (Extensions, Experiments, etc).

File Description
Base [Embedded] Macros A brief overview on working with macros embedded in a Base document. This topic was not covered in the book as the book was written on version 2.4 of Aside from notes contained in this document all other code should work the same--embedded or in global library.
Book Source Code Zipped file with the entire book source code
Other Resources Sample Database (DB1) and Code as Basic Extension
Word Reference API Java Library Java Library to access the API. Library provides interface translate a term, or get synonyms(English only as of 10/30/2011)
[Google] Translator. This is an experimental extension that wraps the Java API for Google translate (
Sub Main
	Dim translator As Object
	Dim sInput As String
	Dim lFrom As new
	Dim lTo As new
	Dim Errors()
	Dim I As Integer
	lFrom=getLocale() 'GET SOFFICE LOCALE

	sInput="I am singing in the rain. Just singing in the rain.
                  What a Glorious feeling, I am happy again.
                   Singing, and dancing in the rain."
        print translator.translate(sInput)
End Sub

Currently only tested on 3.2/Windows XP. I had some installation issues, which were solved by switching to JRE 1.6.0_13 (Tools->Options; Open node, then select Java).

Data Import Wizard Extension Data Import Wizard found in chapter 14 bundled as an extension. This was put together using the Basic Add-On Builder extension.
DB Doc Shortcut. This is a brief extension that creates a desktop shortcut for database documents such as forms and reports. This makes it ideal for situations in which you do not want the user to open the database in order to navigate to a form. This was also put together with the BasicAddon extension.
BaseShell I experienced some errors with 2.4.1 and socket connections. I changed the module to connect with a pipe.
JavaScript & Base Forms This is an experiment most of all, which uses Javascript to connect to Base as well as modify data; also a few objects that bind an HTML form to Base. Unzip the file to view a brief documentation as well as the js library and a demo file. This is my first attempt at binding an HTML form to a Base database, so be gentle. Time permiting I will look into Dojo, and see if I can extend it to handle OOo. --Enjoy
Base Switchboard Extension This is a switchboard (Menu) generator. Menues can be grouped into categories, and menu entries (forms and reports) can reside in the local database or an external database. I will post a quick guide soon.

You may submit any comments or suggestions to
Click here to view documentation.
You can submit a GUI translation by filling out this Form. Please email to and I will to my best to include the translations in the next release.

Menu Entry Icons by
OOo Basic Db Development Demonstrates how to use OOo Basic to access the database API
Forms and Dialogs Demonstrates how to work with OO Basic and Base Forms as well as dialogs.