ooo_mailmerge make produce the final document
Brought to you by:
schlatterbeck
As I understand and from what I tested this is how ooo_mailmerge works:
template.odt: one page with three fields: field1 field2 field3
1.csv "a","b","c"
2.csv "x","y","z"
ooo_mailmerge results in 2 pages document, fine, but the content:
page1: field1 field2 field3
page2: field1 field2 field3
And I still need to make to substitutions inside libreoffice. Can I have
the substitutions done without launching libreoffice and get:
page1: a b c
page2: x y z
?
On Mon, Mar 30, 2015 at 08:58:44AM +0000, mimooh wrote:
You should have one .csv file here with the following content:
field1;field2;field3
a;b;c
x;y;z
Merging that with a one-page template.odt with the given three fields
this should result in a new document with two pages. The first page
should have field1 replaced with a, field2 with b, field3 with c. The
second page should have x,y,z instead.
If that doesn't work, please submit all documents (the initial template
document and the result after mailmerge) together with the .csv file
used. The documents should not contain any confidential information. If
it reproduces a bug, I use such documents to add to my tests which are
released publicly. So please make sure that the document is in a state
that you want to be part of a public test suite.
When submitting a bug-report, please make sure to indicate what you're
seeing -- you may have a different version of OpenOffice or LibreOffice,
so what you're seeing might not be the same as I'm seeing. And please
indicate the version of office program you're using.
Thanks,
Ralf
--
Ralf Schlatterbeck email: ralf@zoo.priv.at
I attach the screenshot and the collection of all the files.
On Tue, Mar 31, 2015 at 08:31:11AM +0000, mimooh wrote:
Thanks!
You're using database fields, replacement for these is currently not
implemented (although it would probably not be much effort).
The fields you should use are found in the menu
Insert -> Fields -> Other
Then under "Variables" (not "Database") select "Set variable", specify a
Name and a Value and for the Format specify "Text".
I've attached a document with this type of field and replecement with
ooo_mailmerge is working (for me) for this document.
Ralf
Ralf Schlatterbeck email: ralf@zoo.priv.at
Hmmm...
I'd say most people would relate mailmerge with database. It was news to me and my collegues that there is another way (Fields > Other).
Still doesn't work for me - tried your version and your template.odt and got the same results: f1, f2, f3 grey fields on two pages - still no substitution.
What I am missing in your Insert > Fields approach is how would one point the data source inside libreoffice (not by the external ooo_mailmerge tool)? There's no dialog, no place to specify my file with the records. I suspect the Insert > Fields > Other was not designed as mailmerge at all! You are just using some side effects and created your own way of mailmerge. And just as I started to suspect this, I found another evidence: what would be the meaning of Name and Value under Insert > Fields > Other? This seems to serve some other purposes. Wouldn't you agree?
regards,
Karol
Last edit: mimooh 2015-03-31
On Tue, Mar 31, 2015 at 02:38:36PM +0000, mimooh wrote:
Yes, this was a way to generate mailmerge-like office documents from
inside a web application. The users could use different templates that
way.
Maybe you need to update the fields under Tools -> Update -> Fields?
If that doesn't do the trick, can you send me the resulting output file?
(I trust that you're using the file from my last message as your
template, if not, please also send me the template file used)
This was never the design intention. If you're doing it interactively
anyway from inside libre office you can use the builtin mailmerge.
As said above: This was designed to create a mailmerge-like document
from a web application. To my knowledge the 'Other' fields don't have a
specified use-case and are as good as any other for the given purpose.
Ralf
Ralf Schlatterbeck email: ralf@zoo.priv.at
As it comes to other aspects I am not questioning it: maybe Insert > Fields it the good way to go. I just never seen it before.
And the screenshot