3
votes

We want to automate OpenOffice, When i search on internet couldnot find a end-to-end help for that and delphi examples are too less. Our intention is to insert document variables and replace the document variable with there values and copying paragraphs etc.

Can any one help me to find an end-to-end help or a pas file like word2000.pas where i can find all the word routines.

Thanks, Basil

2
OpenOffice has python bindings for automation, so you probably won't find anything on delphi. - Spencer Rathbun
@Spencer, your comment suggests that the existence of Python bindings somehow precludes the existence of Delphi bindings. How do you figure? If there are C bindings, Delphi can use them with minimal effort. Surely there are projects that provide Python and C bindings, so why couldn't there be projects that provide Python and Delphi bindings? - Rob Kennedy
@RobKennedy My apologies, I simply meant that python bindings come prebuilt. Looking at the docs it is apparent that OpenOffice includes the ability to bind other languages as well. However, the question seemed to indicate that they wanted to use native delphi code, rather than hooking to a C library, which is what the other half of my statement referred to. - Spencer Rathbun
Latest version 1.3 of OOo by Bernard Marcelly is here now: bernard.marcelly.perso.sfr.fr/index2.html - Warren P

2 Answers

3
votes

I do use OpenOffice-Automation with Delphi a lot and I think there is no "wrapper" with higher functionality for Delphi.

There is a Delphi OO Project on SourceForge with helpers and examples as a starting point: http://sourceforge.net/projects/ooomacros/files/Delphi%20OOo/Version%201.2/Delphi_OOo_v12en.zip/download

Then you have to study the UNO-API and use COM to call the UNO functions.