How can I record a macro?
From Apache OpenOffice Wiki
How can I record a macro?
Go to Tools > Macros > Record Macro, then press the sequence of keystrokes you want. At the end of your sequence click on Stop Recording. In the new window that pops up, give the file a name and save it under soffice > Standard > Module1.