<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font face="Arial">Hi Marco<br>
</font></p>
<p><font face="Arial">I have a Base application with forms. On one
form I press a button which then performs a macro which executes
a mailmerge<br>
</font></p>
<p><font face="Arial">The macro works out <br>
</font></p>
<ul>
<li><font face="Arial">what query to source the data dependent on
which button has been pressed<br>
</font></li>
<li><font face="Arial">where to send the output </font><font
face="Arial"> dependent on which button has been pressed</font></li>
</ul>
<div class="moz-cite-prefix">If your script calls LO headless the
macro could pick up instructions from data created by the script.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Is this any help?<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Alex<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 06/04/2022 21:50, Andrew Pitonyak
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:2bb89b3b-744f-41be-9cb5-e74753b4f07d@pitonyak.org">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">The first step is always do it without a script
until you like the result. Then you try to automate it.<br>
<br>
</div>
<div dir="auto">I did it a few times many years ago and do not
remember the process.<br>
<br>
</div>
<div dir="auto"><!-- tmjah_g_1299s -->Get
<!-- tmjah_g_1299e --><a href="https://bluemail.me"
moz-do-not-send="true"><!-- tmjah_g_1299s -->BlueMail for
Android<!-- tmjah_g_1299e --></a><!-- tmjah_g_1299s -->
<!-- tmjah_g_1299e --></div>
<div class="gmail_quote">On Apr 6, 2022, at 3:37 PM, Marco
Marinello <<a href="mailto:lists@marcomarinello.it"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">lists@marcomarinello.it</a>>
wrote:
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<pre class="blue">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:
<blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">
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 <a href="http://OpenOffice.org" moz-do-not-send="true">OpenOffice.org</a> 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:
<a href="https://ask.libreoffice.org/t/syntax-for-using-spreadsheet-as-data-source-in-emailmerge-macro/24831" moz-do-not-send="true" class="moz-txt-link-freetext">https://ask.libreoffice.org/t/syntax-for-using-spreadsheet-as-data-source-in-emailmerge-macro/24831</a>
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:
<a href="https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=59312" moz-do-not-send="true">https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=59312</a>
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
<a class="moz-txt-link-rfc2396E" href="mailto:lists@marcomarinello.it"><lists@marcomarinello.it></a> wrote:
<blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> 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
</blockquote>
</blockquote>
</pre>
</blockquote>
</div>
</blockquote>
</body>
</html>