Create the macro by selecting Tools->Macros->Organize Macros->OpenOffice.org Basic
Edit a new Macro1 in Module1
Define the Macro1 as below:
Sub Macro1
MsgBox( "Hello World" )
End Sub
Save it and execute it from the command line by:
$ soffice macro:///Standard.Module1.Macro1
You can run OpenOffice headless by specifying the -invisible argument.
$ soffice -invisible macro:///Standard.Module1.Macro1
No comments:
Post a Comment