Am Montag, den 19.02.2007, 15:43 +0100 schrieb Christian Lohmaier:
> Hi Noƫlson, Marc, *,

N'Abend,

> On Fri, Feb 16, 2007 at 04:54:13PM -0300, Noelson Duarte wrote:
> > > 
> > > Does anybody have the solution or even a working sample at hand?
> > > I'd really appreciate it.
> > 
> > You'll find a sample (OOoBasic) here:
> >  http://www.oooforum.org/forum/viewtopic.phtml?t=8393
> 
> oProps must be Variant, not object here, but apart form that this macro
> shows that it is possible to use a mailmergelistener.
> 
> > Perhaps it helps you.
> 
> That snippet, along with Marcs answer "helped" somewhat:
> I know that the mailmerge listener is not suitable for my case.
> 
> 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.

>From having a quick look at the code at least the setup of a database
connection is shown, too. The solution for the problem of touching each
document is made by using fields in a doc template, I think you can
adopt this for inserting barcode pics instead of text snippets. From the
surrounding explanations:

<--->
This command will:

- Open up a new Writer document
- Create a new Data Source with the name provided
- Configure the data source to load tables from the Data Source directory
- Configure the data source to use "," as the value separator
- Insert each of the headings in the first row of the table specified as
   fields in the Writer document
- Save the Writer document as a OpenOffice.org Writer template with the
   name provided

...

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

This will perform a MailMerge using the template file, data source and
table names provided. These should be the same names that you used in
the -create command

</--->

So it shows much more than doing MailMerge ...

> If there would be a way to still use the wizard however, then this could
> work...
> Mut the mailmerge-object requires a documentURL and other properties
> before it can be executed. (and the documentURL would require the user
> to save the document first, etc...), so I doubt that this is possible
> :-(
> 
> So thank you very much for the pointer & answers.

You're welcome-

Marc


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

Reply via email to