Hi Marc, *,

On Sat, Mar 03, 2007 at 05:29:12AM +0100, Marc Santhoff wrote:
> Am Freitag, den 02.03.2007, 16:09 +0100 schrieb Christian Lohmaier:
> > 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]
> > [...]
> > 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.

Yes, the basic-macro already hinted to that... :-(

I personally think this doesn't make too much sense then. If you have to
set up all yourself, then you can do (have to basically if you want the
user to be able to choose only parts of the dataset) the additional step
to iterate through the database as well and the mailmergelistener is
pretty useless/not much of a shortcut then.

(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.

> > > 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.
Choose whether print/save and maybe offer a way to see a preview. 
That is my view of a useful "wizard".

> The sources should be somewhere near the database wizard. That is found
> here:
> 
> http://installation.openoffice.org/source/browse/installation/wizards

As written earlier, I'd love to avoid any unnecessary stuff. I'm a
novice/beginner. So hacking together a complete wizard/replacement is
just over my capabilities.

> 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".

In that case it would be US-only (the postnet barcodes) The principle
however could apply to other use-cases as well of course.
 
> 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.

Would still be a hack though... And not sure whether I'll get the
individual documents (with the individual data) then, and not only the
base document...

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

Exactly..

ciao
Christian
-- 
NP: nichts

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

Reply via email to