[Libreoffice-bugs] [Bug 89178] Mail merge does not change the merge fields in files (when saved as individual documents) to plain text

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Jan 11 19:51:01 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=89178

--- Comment #23 from Jan-Marek Glogowski <glogow at fbihome.de> ---
(In reply to Ben Fleming from comment #22)
> Foe me the gotcha is that I noticed the behavour because I have a BASIC
> macro that produces invoices based on a spreadsheet and/or a base database. 
> When I perform this merge through the UI, the individual documents saved are
> "flattened" as expected.  But doing it through UNO (BASIC), I get the
> version with the fields still intact.

There is a "hidden secret" in the MM wizard code. One step of it allows you to
edit the merged documents before "finalizing" them. But for this step the
wizard actually generates a single document (AKA flattened) and MM just adds
some bookmarks to mark the start / end of each single document. And just as the
last step it splits the document into single ones, if a user prefers this.

I think the MM triggered via "File -> Print" can omit that step, so would be
faster with larger amounts of documents. Obviously the (BASIC) UNO API too.

This is all very non-obvious from the users POV. AFAIK you can MM via "File ->
Print", you can use "View -> Data Sources" and "Tools -> MM wizard". And all
the generators in "File -> New -> Lables / Business cards" use MM in the end
too, as the underlying mechanism. The generating code is always the MM UNO API
with a descriptor to pass options into the code.

I didn't look at the MM and its UI code for a very long time, so that might
have changed, but from your observation it hasn't.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210111/69713e2f/attachment.htm>


More information about the Libreoffice-bugs mailing list