OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Dynamic Writer Applications

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
astravoice
Newbie
Newbie


Joined: 15 Aug 2007
Posts: 2

PostPosted: Wed Aug 15, 2007 5:43 am    Post subject: Dynamic Writer Applications Reply with quote

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
View user's profile Send private message
acknak
Moderator
Moderator


Joined: 13 Aug 2004
Posts: 4295
Location: ~ 40°N,75°W

PostPosted: Wed Aug 15, 2007 6:11 am    Post subject: Reply with quote

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
View user's profile Send private message
bryancole
OOo Advocate
OOo Advocate


Joined: 13 Jun 2003
Posts: 305

PostPosted: Wed Aug 15, 2007 11:50 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group