Hi Marco
I have a Base application with forms. On one form I press a button which then
performs a macro which executes a mailmerge
The macro works out
* what query to source the data dependent on which button has been pressed
* where to send the output dependent on which button has been pressed
If your script calls LO headless the macro could pick up instructions from data
created by the script.
Is this any help?
Alex
On 06/04/2022 21:50, Andrew Pitonyak wrote:
The first step is always do it without a script until you like the result. Then
you try to automate it.
I did it a few times many years ago and do not remember the process.
Get BlueMail for Android <https://bluemail.me>
On Apr 6, 2022, at 3:37 PM, Marco Marinello <li...@marcomarinello.it> wrote:
Hi Andew,
thank you for your answer. I'll take a look at the links you pointed to.
The idea is, starting from a template in odt/doc/docx, to "fill in the
gaps" and save the filled document. Is there any other way rather than
mail merge?
All the best,
Marco
Il 06/04/22 18:19, Andrew Pitonyak ha scritto:
I had planned on documenting how to do this some years back and
AndrewBase.odt, and my only notes say that I
should document the new e-mail merge API released in OpenOffice.org
<http://OpenOffice.org> version 2.01; that
was a long time ago. I generally do not have reason to use mailmerge,
but did you want to send something by
email or to print? Someone posted a question about using mail merge
with UNO in Basic here:
https://ask.libreoffice.org/t/syntax-for-using-spreadsheet-as-data-source-in-emailmerge-macro/24831
From my
perspective, the fact that they used the serverĀ
com.sun.star.text.MailMergeĀ is useful in that it provides a
pointer to the service to look at. Another request for help here:
https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=59312
<https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=59312> No
answer; sadly. In AndrewMacro.odt, there
is an example that merges a bunch of documents from a directory into a
single document and it is listed as
being related to "mail merge", so I assume that somebody had run a mail
merge and this processes created many
documents. But again, I have not run a mail merge in many years. On
Wednesday, April 06, 2022 06:47 EDT, Marco
Marinello <li...@marcomarinello.it> wrote:
Hi all, what's the easiest way to perform a mail-merge with
libreoffice by passing arguments from an
automated script? Should I use UNO? Do you have any reference? Thanks in advance, Best, Marco