- Article Title: Macros
A chronicle of information on the basic macro language with example scripts by Andrew Pitonyak.
LibreOffice Basic Guides
LibreOffice scripts make use of the LibreOffice API , documentation is available at:
Python as a macro language
It is possible to use python as a macro language, more details can be found at this page here:
LibreOffice Python Guides
Lanedo Labs (archived)
A set of code snippets in Basic covering many parts of LibreOffice:
The OpenOffice CodeSnippet website had a collection of macros in various scripting languages:
Python standard output file is not available when running Python macros from Tools – Macros - Run Macro... menu. Presenting the output of a module requires the Python interactive console. Features such as input(), print(), repr() and str() are available from the Python shell.
The Alternative Python Script Organizer (APSO) extension eases the edition of Python scripts, in particular when embedded in a document. Using APSO you can configure your preferred source code editor, start the integrated Python shell and debug Python scripts. The development of this project is discontinued in behalf of APSO. The code will still be maintained here solely for educational purposes. GUI writen in python to embed a python script in a LibreOffice Document.
The Alternative Python Script Organizer (APSO) extension offers a msgbox() function out of its apso_utils module.
Apso Libreoffice Download
MsgBox(txt, buttons=0, title=None)
InputBox(txt, title=None, default=None)
>>> import screen_io as ui
>>> reply = ui.InputBox('Please enter a phrase', default='here..')
>>> rc = ui.MsgBox(reply,)
>>> age = ui.InputBox('How old are you?',)
Copy screen_io Python module in My macros within <UserProfile>/Scripts/python/pythonpath,
Copy uiScripts Basic module in My macros Standard Basic library,
screen_io Python module
uiScripts Basic module
Apso Libreoffice Mac