Contents

# LibreOffice Python Scripts Help

LibreOffice provides an Application Programming Interface (API) that allows controlling the LibreOffice components with different programming languages by using the LibreOffice Software Development Kit (SDK). For more information about the LibreOffice API and the Software Development Kit, visit https://api.libreoffice.org

This help section explains the most common Python script functions for LibreOffice. For more in-depth information please refer to the Designing & Developing Python Applications on the Wiki.

## Working with Python Scripts in LibreOffice

You can execute Python scripts choosing Tools - Macros - Run Macro. Editing scripts can be done with your preferred text editor. Python scripts are present in various locations detailed hereafter. You can refer to Programming examples for macros illustrating how to run the Python interactive console from LibreOffice.

The LibreOffice scripting framework for Python is optional on some GNU/Linux distributions. If it is installed, selecting Tools - Macros - Run Macro and checking Application Macros for the presence of HelloWorld – HelloWorldPython macro is sufficient. If absent, please refer to your distribution documentation in order to install the LibreOffice scripting framework for Python.

在 LibreOffice 中指定程式檔

Setting up an Integrated Development Environment (IDE) for Python

Python Scripts Organization and Location

Running Python Interactive Console

Programming with Python Scripts

Python programming examples

Calling Basic Macros from Python

Creating Python Scripts with ScriptForge

## LibreOffice Python Modules

msgbox module

scriptforge module

uno module

#### Help about the Help

「說明」會參照設為預設系統上的程式預設值。色彩、滑鼠動作或其他可設定項目的描述，都可能會和您的程式及系統不同。

The LibreOffice Help

The Help Index

Bookmarking Help pages

Contents - The Main Help Topics

Getting Support

Please support us!