Moin Christian,

Am Freitag, den 02.03.2007, 16:09 +0100 schrieb Christian Lohmaier:
> Hi Marc, *,
> 
> On Mon, Feb 19, 2007 at 06:32:12PM +0100, Marc Santhoff wrote:
> > Am Montag, den 19.02.2007, 15:43 +0100 schrieb Christian Lohmaier:
> > > [mailmerge-listener]
> > > If I cannot use the builtin wizard, but have to ask the user for the
> > > desired Database, etc myself and have to start the mailmerge from within
> > > my extension, then this would be far too much effort and thus pretty
> > > useless to me.
> > 
> > You could search the archives of this list for:
> > 
> >  From [EMAIL PROTECTED] Mon Sep 27 14:43:34 2004
> >  Subject: Re: [api-dev] mailmerge api usage
> >  Message-id: <[EMAIL PROTECTED]>
> > 
> > There you can find a complete working example of doing MailMerge written
> > in Java. If it is not on the list please tell me, I'll forward it to
> > you.
> 
> I think I found the mail you're refering to, but unforutnately it
> doesn't use the wizard-functionality, but instead requests the
> database/table to use in the merge as arguments.
> http://api.openoffice.org/servlets/ReadMsg?listName=dev&msgNo=11328

But at least it showshow this stuff is expected to work.

> > From having a quick look at the code at least the setup of a database
> > connection is shown, too.
> 
> Yes, but this still would require me to write code to ask the user for
> the requested database and to duplicate all the stuff the current
> mail-merge wizard has builtin. (I personally don't like the wizard at 
> all, but I don't want to write one myself either)

Okay, thinking about it two ideas come to my mind:

1. Hacking up^w Improving the wizard

The sources should be somewhere near the database wizard. That is found
here:

http://installation.openoffice.org/source/browse/installation/wizards

It could be a nice feature to have ... although I don't know if there is
something similar in other countries or if this would be "german only".

2. Trying to use one of the event hooks at the document in process

There is an event "Serienbriefe drucken", or maybe "Dokument drucken"
will fit your needs. I think you could hook to one of them and trigger
your macro there.

The only question left then is, whether the hook is called only once at
the start of mail merging or for each document with the actual data
merged in already.

HTH,
Marc


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to