Finding more information
Numerous resources are available that provide help with writing macros. Use Help > OpenOffice.org Help to open the OOo help pages. The upper left corner of the OOo help system contains a drop-down list that determines which help set is displayed. To view the help for Basic, the drop-down must display Help about OpenOffice.org Basic.
Included material
Many excellent macros are included with OOo. Use Tools > Macros > Organize Macros > OpenOffice.org Basic to open the Macro dialog. Expand the Tools library in the OpenOffice.org library container. Inspect the Debug module—some good examples include WritedbgInfo(document) and printdbgInfo(sheet).
Online resources
The following links and references contain information regarding macro programming:
- http://www.openoffice.org (the main link)
- http://codesnippets.services.openoffice.org/ (categorized examples)
- http://user.services.openoffice.org (the OpenOffice.org User Forum is a good place to ask for help with macros)
- http://www.oooforum.org (if you need help with your macros this is a good place to ask)
- http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html (official IDL reference, here you'll find almost every command with a description)
- http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html (official documentation that contains a detailed explanation)
- http://www.pitonyak.org/oo.php (Andrew Pitonyak's macro page)
- http://www.pitonyak.org/AndrewMacro.odt (numerous examples of working macros)
- http://www.pitonyak.org/book/ (Andrew Pitonyak wrote a book on macros)
- http://www.pitonyak.org/database/ (numerous macro examples using Base)
- http://docs.sun.com/app/docs (Sun wrote a book on macro programming—very well written and laid out)
- http://documentation.openoffice.org (contains content related to macros)
- http://ooextras.sourceforge.net/ (examples)
- http://sourceforge.net/project/showfiles.php?group_id=43716 (examples)
- http://homepages.paradise.net.nz/hillview/OOo/ (numerous excellent macros, including reveal codes macros, key macros, and information on converting from MS Office)
- Introduction to OO macro writing Leads to macros for ooBase. From Sheepdogguides.com.
Published material
The following published sources contain macro examples. The most obvious example is the documentation from Sun. Start from Sun's documentation site http://docs.sun.com/app/docs and search for StarOffice documentation.
Andrew Pitonyak wrote a book called OpenOffice.org Macros Explained. Two chapters are available as direct downloads from the publisher. See http://www.pitonyak.org/book/.
Dr. Mark Alexander Bain wrote Learn OpenOffice.org Spreadsheet Macro Programming (see http://www.packtpub.com/openoffice-ooobasic-calc-automation/book).
Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY). |