Iannz OpenOffice.org page

All these macros and documents are open source, and the reason behind posting them here is to get feedback, so please give me feedback! These macros have been tested using OpenOffice.org 1.1.1 for Linux, but use at your own risk. They are made available under the Gnu Lesser General Public License.

To use these macros: Download the files to your computer. Depending on your browser you may have to right click on the file names in the left column of the table, and choose something like "Download link". Once you have the file on your system simply open the file in OOo. Most have a demo button so that you can try out the macro on the current document. The documents have instructions on how to use them. Included in the document is instructions on how to install the macros. Some of the Calc macros don't have these instructions but you could either download a Writer macro and read the instructions there or see this thread http://www.oooforum.org/forum/viewtopic.php?t=7995.

See http://www.openoffice.org.nz/ for a New Zealand based OpenOffice.org site.

For a wiki on OpenOffice.org extension development see http://wiki.services.openoffice.org/wiki/Extensions_development_basic.

Link (right click)




This document has been split into several smaller documents and is now being maintained at:

The current reviewed version is available from: http://documentation.openoffice.org/manuals/index.html

On the 14 May 2004 I found a similar document by Sun: http://se.sun.com/edu/staroffice/so_migration_guide_0104.pdf



This is for people that are still using Microsoft Office but wish to work with people using OpenOffice.org. The document is summarized from my document above.


010 User Manual -- Iannz Find Files.sxw

Unlike my other macros, this macro needs to be installed using pkgchk for Ooo1.1.x! It also requires Pyuno (usually installed by default). For info. on installing in Ooo1.1.x and using this macro download the user manual available in the link to the left.

Works with 1.9.79. To install: Tools > Package Manager... > select My Packages > Add... > select IannzFindFiles.uno.zip > Open.

This release works with OOo1.9.74 - 1.9.77 provided that links are created as per http://www.openoffice.org/issues/show_bug.cgi?id=38866.

This macro allows you to specify criteria for finding an OOo file, including text within a file, and displays those files which match the criteria. Double clicking a displayed file opens the file.

This is an updated release (31 Jan 05), and my first foray into Python components, and packaging for pkgchk.

The Python component is heavily based on Daniel Naber's loook.py available from http://www.danielnaber.de/loook/. I started with Andrew Brown's find file macro available from http://www.darwinwars.com/lunatic/bugs/oo_macros.html, and used concepts developed by Danny Brewer. But any mistakes are mine.





A routine to extend Writer so that the Alt key can be used for shortcuts. It allows the user to easily assign alt+key shortcuts to apply styles, insert text, dispatch commands, and run global macros. This document also has the macros for indents as per the Indents file below. Also added routines for entering unicodes, ensuring double spaces after every sentence, and for inserting a temporary bookmark so that the user can easily jump back to that location. Last updated 15 Feb 2005.

Two people have sent me instructions for installing AltKeyHandler in OOo2.0. I keep meaning to make these uno packages so that they are easier to install in 2.0 but still haven’t done so. AltKeyHandler - Installationsanleitung.pdf are installatin instructions in German and AltKeyHandler_2.0_installation_routine.odt is in English.

KeyHandler.sxw is an experimental replacement of AltKeyHandler which includes the ability to have key sequences (think WordStar) for shortcuts. Modified 18 Mar 2005.


This macro, currently, only displays a wizard for page numbering in a Writer document. The idea of making it available now is so that people can give feedback on the user interface before I waste time coding something that no one wants. Last updated 26 June 2004.


This is very much a work in progress that I need some feedback on. The concept is to try and provide the sort of functionality that WordPerfect's RevealCodes. At this stage it is fairly primitive - I need feedback as to what people want so that I can improve it. Last updated 10 June 2004.


This is an alternative to the above RevealCodes and is, perhaps, closer to the way WordPerfect works. If you want this macro to be improved then give me feedback! Either directly or via the forum thread: http://www.oooforum.org/forum/viewtopic.php?p=36976. Last updated 06 Oct 2004.


A third alternative. This macro requires to be installed to be able to use it - therefore it doesn't have a Demo button. Use RevealCodes2 above for a general concept demo. This version is configurable, including button colours and what happens when you click a button. Last updated 12-Nov-2004.


An updated version by Jean-Nicolas Culot: OutlineCrossRef3-fr-3.odt

My first OpenOffice.org Writer macro.

This writer document presents a dialog with a tree control for all headings in the document. You can then select a heading and specify which reference types (and text between) you want inserted. Last updated 11 Nov 2004.

The equivalent document available from http://ooomacros.org/ has not yet been updated.



This macro is for managing references to either bookmarks or set references. It enables you to:

    Find where in the current document you have references to a particular bookmark or set reference.

    Delete set references without losing the text (but you will lose any nested set references).

    Convert between bookmarks and set references and vice versa, including all references to the converted reference.

    Rename set references and bookmarks and update all references to them with the new name.

    Find references to bookmarks and set references that no longer exist (i.e. orphaned references).

    To reassign references to another set reference or bookmark.

ReferenceManager1.sxw contains a revised version that includes the ability to find references to variable instances (such as those used in captions). Last updated 13 Mar 2006.


A quick and dirty hack for finding bibliographic text field references.


It is much better to use styles than to directly apply formatting attributes, but when writing a simple letter having a quick way of adjusting indents, including hanging indents is useful. For people changing from Word or Word Perfect to Writer not having simple key presses for these is annoying thus I wrote these simple macros for hanging indents, and the installation notes explain how to assign these macros to key presses together with assigning key presses to the commands for increase Indent and Decrease Indent. Last updated 29 June 2004.


The purpose of this macro to is shrink the length of the active Writer document one page by reducing font size. It does this by converting all used paragraph styles to being, eventually, proportional on the paragraph style “Default”, and converting all directly applied font size changes to being character styles with the font size being proportional on a new character style called "IannzBaseCharStyle". Then progressively changes the default font sizes by one point until the document is reduced by one page.


This is a custom Find and Replace macro that uses regular expressions but can include up to 9 paragraphs and manual page breaks in the search criteria. I have received positive feedback but more suggestions are always welcome. Now includes the ability to search and replace character and paragraph styles. The style feature has not been thoroughly tested.

Last update introduced a bug that when replacing $ with \n it would remove the first character of the next line, now fixed (hopefully I haven't introduced any new bugs). Last updated 31 Oct 2006.


With this macro you can select a Math object (also referred to as a Formula or Equation) run the macro and all other Math objects in the Writer document will be given the same fomat properties.

Use only in OOo 1.1.2 and above. Macro now checks OOo version so it won't run in Ooo1.1.1.

Last updated: 22 October 2004.


This macro in this document copies the current document in DokuWiki format, so that it can be pasted into a DokuWiki editing page.

See: a review here.

Updated 1 April 2005.


This spreadsheet contains a macro that presents a dialog for selecting / replacing within a selected range:
Blank cells
Visible cells
Constants (Date/Time, Numbers, and/or strings)
Formulas (Numbers, Strings, and/or Errors)




A macro for managing, creating and modifying data pilots based on sheet data within an OpenOffice Calc document. Last updated (bug fixes and instructions included) 29 June 2004. Crudely added page support in MyDataPilot2.ods 17 Jul 2006.

It demonstrates:
    a listbox acting as a "tree" control
    controls for deleting items in a listbox
    controls for changing the order of items in a listbox
    range selection within a dialog (currently need to click a button first)
    two page tab control
    limiting key entry in a text field

    working with data pilots based on sheet data

Thanks to sliderule MyDataPilot3.ods now includes options for show empty and grand totals.


Demonstrates the use of a lisbox with data displayed in columns, including having a hidden column.


This macro I wrote for someone on the oooforums. It iterates through a list of students, updating a cell, the value of the cell determines which student's results are charted, the macro then copies all charts on the sheet to a new Writer document such that each student's charts start on a new page.


This is a slightly reworked version of Daniel Carrera's Hebrew Virtual Keyboard.


This is a slightly reworked version of Danny Brewer's Significant digits macro. It is here for discussion. The more appropriate location for this macro is: http://kosh.datateam.com/~danny/OOo/DannysCalcPowerTools/.


A template that I am working on for displaying the ViewCursor's current location in the status bar. This file is for testing purposes only!


The macro in this file allows you to replace a set of occurences of text in all files in a folder. The file contains a table, in the first column you put the text to search for, in the second column the replace text, and then hit the button, to specify the folder. It is not the fastest approach, and it doesn't take advantage of the odt file format but it might be useful.


This file contains a demo of changing a check box in a document and updating a variable, with conditional text being dependent on that variable. 12 Oct 2006.

If you have found what I have written useful and would like me to be able to continue working on OpenOffice.org macros you may like to send a cheque (a cheque from any country is fine) to:

Ian Laurenson
RD 3
New Zealand

If there is a particular macro that you would like written (financial incentives frequently not necessary if the work is to be open sourced) then please contact me.

Email: hillview@paradise.net.nz