Jump to content

Macros/General

From The Document Foundation Wiki

The following macros can be used in at least two modules of LibreOffice.

LibreOffice Basic Python
Running Python Interactive Console
Getting Session information
Identifying the operating system
Screen I/O Functions Input/Output to Screen

Note:
Display a message box … thread [1] describes how to display a message using either Beanshell, Java, JavaScript or Python.

Opening a Dialog with Basic Opening a Dialog with Python
Creating Event Listeners
Monitoring Document Events
Download .ODS file with Python listener included, .ODT file with Basic listener included.
Creating a Dialog Handler
Disabling menu commands at runtime
Download .ODT file with Python disabler/enabler included.
tbd - Open a document with its default application - in french tbd
tbd - Use LibreOffice icons - in french tbd
tbd - Copy a data range from clipboard - in french tbd
Delete unused styles tbd
tdb - Change size or font for all formulas inside a document - in french tbd
tdb - Copy without the clipboard - in french tbd
Display the date & time a file was created or last modified tbd
How to export as hybrid PDF tbd
Download To File tbd
Get unformatted text from clipboard tbd
Calling a Python script Calling a Basic macro
Loading Basic libraries Importing Python modules
tbd - Screen I/O localisation - cf. InfoBar example

LibreOffice Basic

Refer to LibreOffice Basic Help for using Basic as a macro language.

Python

Refer to Python Scripts Help for an introduction to Python as a macro language.

JavaScript

Refer to JavaScript macros - xlated from japanese - for an introduction to JavaScript as a macro language.

Notes