Macro - python

Getting Started

  • On linux, the sample files can be found in:

  • OpenOffice will have created a ~/ folder for you. This folder will contains a Scripts folder. We need to create a python folder inside it for our scripts:

    cd ~/
    mkdir python
  • To get started, make a copy of one of the sample scripts e.g:

    cd ~/
    cp /usr/lib/openoffice/basis3.1/share/Scripts/python/ .
  • To check the script is working, re-start OpenOffice and select Tools, Macros, Organise Macros, Python, My Macros.

    Inside the My Macros section you should see the HelloWorld script containing the HelloWorldPython class.

    Select HelloWorldPython and click Run.