NewsForge: Formatting Documents with OpenOffice.org Writer Macros
Sep 20, 2004, 11:30 (0 Talkback[s])
(Other stories by Michal Kosmulski)
"Around the time OpenOffice.org 1.1 RC was released, I was
migrating a small company from Corel WordPerfect to OpenOffice.org.
OpenOffice.org by itself does not support reading or writing
WordPerfect files, but a tool called wpd2sxw can convert
WordPerfect files to OpenOffice.org format (SXW). After conversion
with wpd2sxw, which was rather good but had problems with some
formatting features, I applied macros to documents based on
different templates to make more than 2,000 converted documents
look very similar to original WordPerfect files they were generated
from. This article presents some macro 'building blocks' you can
use to modify a document's formatting or to generate well-formatted
documents from plain text files.
"OpenOffice.org uses StarBasic as its macro language. I won't go
into details of the language itself, but the examples given here
should be easy to understand if you have some programming
experience. You can find tutorials and general information
regarding StarBasic macros, along with information on
OpenOffice.org scripting, elsewhere on the Web..."