Hi Christian,

The service OfficeDocument has an interface XEventBroadcast to register
listeners of event documents. There are two events of interest here:
OnMailMerge e OnMailMergeFinished. Maybe this is the way to do your work
(only a guess).

HTH

----- Original Message ----- 
From: "Christian Lohmaier" <[EMAIL PROTECTED]>
To: <dev@api.openoffice.org>
Sent: Wednesday, March 07, 2007 4:44 PM
Subject: Re: [api-dev] Registering an XMailMergeListener - possible at all?


> Hi Marc,
>
> On Wed, Mar 07, 2007 at 07:31:52PM +0100, Marc Santhoff wrote:
> > Am Mittwoch, den 07.03.2007, 14:59 +0100 schrieb Christian Lohmaier:
> > > > >
http://api.openoffice.org/servlets/ReadMsg?listName=dev&msgNo=11328
> > > >
> > > > But at least it showshow this stuff is expected to work.
> > > [...]
> > > (and indeed the cited sample doesn't use the mailmergelistener at all)
> > >
> > > I guess I'll just file an issue to have something like "you need to
> > > create your own mail-merge to use the listener" to the docs.
> >
> > Please do that, it happens that some framework designs from the
> > "thinking lab" are conceptually nice and orthogonal but not well suited
> > for practically using them.
>
> ???
> Why not add a hint for other users that they cannot use the
> mailmerge-listener to hook-up into the existing wizard?
> That would save those that come after me the fuzz about trying with no
> success and asking on the mailinglist and waiting for an answer, only to
> get to know that trying with the mailmerge-listener was wasted time
> since it cannot be used that way?
>
> > > > > > 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
> > >
> > > Honestly, I like the OOo 1.x way much better. No fancy wizard. Just
drag
> > > the fields into your document where you want them, optionally add some
> > > conditions (that's where help from a wizard would come handy), then
> > > select the set of rows you want to have included and fire off the
> > > mailmerge.
> >
> > If I'm honest too, I must admit that I'm only rarely using 2.x and never
> > did use the wizard myself. Isn't it possible to switch that thing off?
>
> It is somewhat possible. You must edit your toolbar to add an icon for
> the old mailmerge. The new wizard and the old way have the same name, so
> you have to guess. You cannot add this icon to the database-beamer
> toolbar, you have to add it to the default toolbar.
> And even worse: you cannot select the datarows before launching the
> wizard, the selection is lost. Instead the old-style-dialog will open a
> new dialog that has a grid control that showst the databasetable. There
> you can highlight the rows that should be part of the mailmerge.
>
> > I'll try mail merge on 2.x later on ...
>
> Please do. And you'll shake your head...
>
> > For me 1.1.[3|5] is still working well in most situations. ;)
> >
> > > Choose whether print/save and maybe offer a way to see a preview.
> > > That is my view of a useful "wizard".
> >
> > Sounds good, the preview widget is already in the code somewhere.
> >
> > On the other hand: you might have choosen the wrong task for beginners
> > level.
>
> You got me totally wrong. I do not intend to write a new wizard. I was
> seeking an easy solution to integrate the functionality of my addon.
> Both for me, as well for the user who'll use the addon.
>
> I thought of adding a button "run the merge with the addon", that would
> just launch OOo own's mail-merge wizard, but with the listener added, so
> that I could modify the created documents (but now I know that this
> doesn't work)... Everything else, especially hacking OOo itself is much
> of an effort (and as you wrote yourself: Not something for a beginner
> like me :-)
>
> ciao
> Christian
> -- 
> NP: Evanescence - Like You
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.446 / Virus Database: 268.18.7/713 - Release Date: 7/3/2007
09:24
>

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

Reply via email to