| View previous topic :: View next topic |
| Author |
Message |
astravoice Newbie

Joined: 15 Aug 2007 Posts: 2
|
Posted: Wed Aug 15, 2007 5:43 am Post subject: Dynamic Writer Applications |
|
|
I was wondering how it is possible to programatically modify the contents of an open-office writer document.
I want to migrate an old VB App that uses the MS Word library.
The current app generates reports in word documents at the end of a process,
The Version 2.0 of this app, would be to get rid of MS Word and Replace it with OO Writer.
I think its pretty simple just don't know where to find this type of documentation.
Also, does ooBase integrate into writer? Meaning can you use base for a mail merge type application? |
|
| Back to top |
|
 |
acknak Moderator


Joined: 13 Aug 2004 Posts: 4295 Location: ~ 40°N,75°W
|
Posted: Wed Aug 15, 2007 6:11 am Post subject: |
|
|
Sure. OOo can be scripted using BASIC, Python or Java. The BASIC is close to VBA but not interchangeable. There is an active project to develop a VBA to OO BASIC translator.
You best bet for resources is to check the stick topics in the "Macros & API" forum, or try some searches. If you don't find anything, ask there.
OOo integrates database access into Calc and Writer. You can use Base to create and maintain a database, then access it from Writer for a mail merge. Just beware, that whole area is "under construction". It's fine for simple things, just don't be surprised to run into trouble. |
|
| Back to top |
|
 |
bryancole OOo Advocate

Joined: 13 Jun 2003 Posts: 305
|
Posted: Wed Aug 15, 2007 11:50 am Post subject: |
|
|
| An alternative approach is to create the .odt files directly. OpenDocument files are basically zipped xml. You can create your template file, then unzip the result and inspect the contents to see which tags to modify to add the content you want (in the content.xml file, as it happens). This might be easier than working with the OOo API. |
|
| Back to top |
|
 |
|