You can use macros in OpenOffice.org; how you use them or attach them is very flexible (and thus perhaps a bit more complex).
- Write a macro by choosing Tools > Macros > Organize Macros > OpenOffice.org Basic.
- Record a macro by choosing Tools > Macros > Record Macro.
- Attach a macro to a form component like a button. Add one by choosing View > Toolbars > Form Controls, click a control tool, and draw the control. Right-click on the component, choose Control, and assign the macro in the Events tab.
- Attach a macro to a keyboard shortcut, menu, or toolbar under Tools > Customize.
This link offers a huge number of resources for using macros.
This was first published in May 2007