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

> 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)

> [...]<--->
> 
> % java MailMerger -merge <URL of template file> <Data Source name> <Table 
> name>

I don't want to deal with selecting the datasource/table at all. I only
want to replace either a field or a bookmark/placeholder in the
merge-document before it is printed/saved.

> </--->
> 
> So it shows much more than doing MailMerge ...

Yes, it shows how one could do this, but I want to avoid all this...

I think I'll just tell the user to use the "modify document" button and
then run the macro.

Not perfect, but still far easier than setting up a mail-merge from
scratch.

ciao
Christian
-- 
NP: The Smashing Pumpkins - Porcelina Of The Vast Oceans

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

Reply via email to