OpenOffice.org Macro Information

By

Andrew Pitonyak


HOMEBookConferencesOpenOffice.org MacrosDatabaseSpamPerlMy Perl UtilitiesVYMMisc

Andrew Pitonyak's OpenOffice Macro Information

My OpenOffice.org Macro document (updated June 14, 2014 06:27:00 PM EDT) contains many examples. This document is updated frequently so check back frequently. When you find errors, please inform me. Be certain to check out my book OpenOffice.org Macros Explained. You can look at my book page.

Translations

Czech

This article is translated into the Czech language for CzechLib community (electronic knowledge database). Translated by Alex Novak from autip.com.

Tento článek je přeložen do Česká jazyk pro CzechLib komunitu (elektronické databáze znalostí). Překlad Alex Novák z autip.com.

Bulgarian

This page has been translated into Bulgarian (see http://www.fatcow.com/edu/pitonyak-openoffice-bl/ by Albert Ward. Thanks Albert, you did a great job!

Special Message: Albert, I have reason to believe that a few of me email messages to you did not make it to you. I believe that it is related to how my outgoing mail is usually processed. If you translate the paragraph above into Bulgarian, I will add the text to this page.

Do You Have A More Complete Book?

My Book presents material in an organized fashion designed to teach you the material as you read. My free macro document, on the other hand, is a less organized collection of examples with little explanatory text. If you want to learn and see many of the details with complete working examples, buy my book. If you want a large collection of miscellaneous examples, download my macro document. There is very little overlap between the examples in the book and the examples in my macro document, so you probably want both.

I want to know more about fonts

My macro document is becoming rather large, and I wanted to include information concerning fonts. I opted to create a document (updated July 17, 2013 09:14:29 PM EDT) that inspects fonts. I also have a PDF version of the document. The new document requiers OpenOffice.org version 2.0 or later to run.

The document can create a summary of the supported fonts with an example of how the font looks. A listing of the font descriptor can be written to a Calc document. Tables that show the characters with ASCII values from 32 to 255 for every font in the system.

Feed Back

If you have good examples to include in my document, send me an email. I welcome constructive criticism and examples.

How Do I Obtain Help?

If you have questions about macro programming in OpenOffice I recommend that you:
  1. Check existing online resources to see if you can find solutions.
  2. Post your questions on the dev mailing list. This allows the entire community to think about and help you solve your problems. There are smart people with a lot of experience who frequent the list and many of them know things that I do not. It is better to obtain a quick, free, existing solution than to wait for me to solve the problem.
  3. Although I am flattered by the many requests for help with OpenOffice Macros, I do not have time to handle all of the requests that I receive. For this reason, I prioritize the requests. My paying clients come first.

How I Find On-Line Information

When I want to know about a specific issue, I usually search the Developers Guide, the tutorial, and then finally a google search. If I want to know something about cursors, some posible searches include "Cursor OpenOffice", "XCursor OpenOffice", and "site:api.openoffice.org Cursor". The last search is one of my favorites.

If I already know something about the class, service, or interface that interests me, I can sometimes go directly to the API web site. Assume that I started with a web search and found the web site on word cursors: http://api.openoffice.org/docs/common/ref/com/sun/star/text/XWordCursor.html I want to see what else might be related under "com.sun.star.text" so I replace "XWordCursor.html" with "module-ix.html" to see all of the modules for "com.sun.star.text". If you just want to browse, a good place to start is: http://api.openoffice.org/docs/common/ref/com/sun/module-ix.html

My Main Downloads

Document Updated Description
OpenOffice.org Macros Explained.odt June 14, 2014 06:29:44 PM EDT Starting on a third edition. Will see if this works out or not.
OpenOffice.org Macros Explained.pdf June 14, 2014 06:30:41 PM EDT And here is the PDF version.
OOME_3_0_deutsch.odt Diese Übersetzung wird nach und nach in der Reihenfolge der Originalkapitel vervollständigt und somit noch eine ganze Weile als Torso erscheinen. Ich habe vor, nach jedem neu übersetzten Kapitel eine Aktualisierung der Downloadfassung vorzunehmen. Die Leser mögen also in gewissen Abständen den aktuellen Stand überprüfen. http://www.uni-due.de/~abi070/ooo.html
OOME_3_0_deutsch.pdf Diese Übersetzung wird nach und nach in der Reihenfolge der Originalkapitel vervollständigt und somit noch eine ganze Weile als Torso erscheinen. Ich habe vor, nach jedem neu übersetzten Kapitel eine Aktualisierung der Downloadfassung vorzunehmen. Die Leser mögen also in gewissen Abständen den aktuellen Stand überprüfen. http://www.uni-due.de/~abi070/ooo.html
OpenOffice.org Macros Explained.pdf June 14, 2014 06:30:41 PM EDT And here is the PDF version.
Database Macros Most of my database related content is on the database page.
English Macro Document June 14, 2014 06:27:00 PM EDT This is my main macro document that contains numerous examples and explanatory text.
PDF English Macro Document June 14, 2014 06:27:33 PM EDT This is my main macro document that contains numerous examples and explanatory text.
Incomplete comments on VBA July 30, 2007 05:36:59 PM EDT Some years ago, I compared VBA and OOo Basic based on the language syntax. I never finished.
PDF Incomplete comments on VBA July 30, 2007 05:37:07 PM EDT Some years ago, I compared VBA and OOo Basic based on the language syntax. I never finished.
My Macro Libraries June 7, 2014 12:28:36 AM EDT A collection of my personal macro libraries. Assume that these are not tested and will destroy everything on your system. My most used macros are the Inspect() macro in the Pitonyak lib, and the macro formatting macro.
Font Document July 17, 2013 09:14:29 PM EDT Demonstrates how to inspect fonts using macros. You can create font summaries and font lists.
PDF Font Document July 17, 2013 09:14:31 PM EDT A PDF version of AndrewFontMacro.odt. Obviously, the PDF version does not contain push buttons that can automatically run the macros.
Dialog Examples July 16, 2003 06:52:09 PM EDT My macro document contains a section on forms. I show how to use most of the control objects. This document is the dialog example mentioned in my macro document. This will show all of the methods, properties, or services of a given object.
Document Template June 7, 2014 12:04:10 AM EDT This is the template that I use in my macro document. Although you do not need this template, I have received numerous requests for this document. If you do not have this template on your system when you open the document, OpenOffice will ask if it should look for the template the next time that the document is open. If I change the template, the changes will be reflected in the macro document. If you do not understand how this powerful feature works in OpenOffice, you should learn all about it.
Deutsche Übersetzung Makro-Dokument June 29, 2003 09:54:31 PM EDT Dieses ist eine deutsche Übersetzung meines Makrodokumentes. Die Übersetzung erfolgte durch Muttersprachler. Mein Hauptdokument enthält mehr Informationen als die deutsche Version, weil es neuer ist.
Traduction Française Voici la traduction française de mon document, effectuée par le projet Documentation de la branche française d'OpenOffice sous le nom de "Eléments de programmation des macros dans OOo". Mon document original contient plus d'informations car mis à jour depuis la dernière traduction. Ce lien vous mènera directement sur la page Web contenant cette traduction.This link will take you to a French web site that contains a French translation of my document.
Russian translation of AndrewMacro.odt. October 14, 2007 02:20:34 PM EDT Russian русский (Russian translation) Макросы OpenOffice, first draft. See http://buhcia.narod.ru

Hosted Material

Material was sent to me, so I am hosting it here...

I used the explanations provided to me by the authors.

Document Updated Description
Form Utilities October 10, 2010 04:53:51 PM EDT Allows you to use the enter key to move through a form rather than using the TAB key.
Data Input October 10, 2010 04:53:51 PM EDT Gotes to only white (1677215) cells in a range (instead of the default -1). Great way to use the sheet as an input form.
Time Functions October 10, 2010 04:53:53 PM EDT Custom function to determine elapsed time in hours for payroll and similar. Uses a period instead of the colon so that time can be entered without using the shift key.
Cash Register October 10, 2010 04:53:52 PM EDT A cash register that the author of this macro used with his Address Barcode reader.
December 31, 1969 07:00:00 PM EST
December 31, 1969 07:00:00 PM EST

Useful Macro Links

Here are some links and references:

Document Description
ooRexx Nutshells Diploma work by Josef Frysak, under the watchful eye of Rony G. Flatscher, titled "Automating Open Office - ooRexx Nutshells". If you want to know how to use ooRex to access OOo, this has numerous excellent examples. The document also contains significant background material that is useful, even if you are not using Rex.
Using Visual Basic A quick quide to using VB to access OpenOffice.
Main OpenOffice Site Primary OpenOffice website, complete mailing lists and downloads
OpenOffice API Site This site takes some getting used to but it is very complete
Sun had a macro programming book. An excellent book. This is probably the place to start for free materials. A warning, however, this contains the same errors as the included help documentation. One problem that I noticed after quickly skimming the book is the problems with the case statements are still there. That said, someone spent a lot of time and did a pretty good job.
tutorial.pdf Excellent document on using macros.
DevelopersGuide This has information about the developers guide including how to download it as a pdf file. Although this document can be difficult and daunting, it is an excellent resource.
OpenOffice Documentation Site A good place to start when looking for documentation
How_to_use_basic_macros.sxw If you want to embed macros in your document and interact with buttons and such, this is your document
Uno Development Kit Learn all about the Uno Development Kit
One of the top level module links. A good place to start if you want to traverse the infrastructure.
Developer Guide Examples When a smart man decides that the JAVA examples in the developers guide should be available in Basic, this is what you get!
8 Days A Week Can't download a copy of OpenOffice.org, you can order a copy here. They have other OOo related things as well.

Valid XHTML 4.0! Last Modified June 1, 2014 12:43:24 AM EDT© 1999-2014 Andrew Pitonyak (email me at: andy @ pitonyak.org)