Bug 36075 - Mail merge: Let the file name be from a variable
Summary: Mail merge: Let the file name be from a variable
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: VOTE
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2011-04-08 04:52 UTC by Larsen
Modified: 2022-05-03 11:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Print dialog for Mail Merge (26.44 KB, image/png)
2022-04-07 19:25 UTC, Mike Kaganski
Details
StarOffice Mail Merge (Form Letter) dialog (65.12 KB, image/png)
2022-04-08 08:35 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Larsen 2011-04-08 04:52:35 UTC
When creating multiple documents it would be nice if the file name would not just be the file name with an increasing number, but if you could also insert variables.

Example:
You want to create a letter to multiple people and you want the file name to be "<firstname>_<lastname>.odt" taken from the data source.
Comment 1 Jan Holesovsky 2011-04-14 04:58:00 UTC
Not sure how exactly do you want to achieve that - can you write more?  Either way, isn't Mail Merge what you want here?
Comment 2 Larsen 2011-04-14 06:07:59 UTC
Say I have a letter that I want to send to three people whose names are stored in a OO Calc document:

Jon Doe
Jane Doe
Chuck Norris

I create a Writer document and with Mail Merge insert the corresponding fields into it.

When Mail Merge finally creates the output as multiple documents, it uses the filename I enter and then adds a number at the end, e.g. when I use "letter.odt", I get "letter_0.odt", "letter_1.odt", and so on.

Now, I e.g. would like to have the name of the people instead of "letter", so I would use "<firstname>_<lastname>.odt" and then get "jon_doe.odt", "jane_doe.odt" and "chuck_norris.odt".

(In case a name exists twice, OO could still append a number)
Comment 3 Björn Michaelsen 2011-12-23 12:06:40 UTC Comment hidden (obsolete)
Comment 4 Larsen 2011-12-23 13:06:25 UTC
This bug is an enhancement request, so I guess it´s ok to move it to NEW.
Comment 5 Björn Michaelsen 2011-12-23 14:58:56 UTC
NEW, unassigned bug: replace "infoprovider" with move to state "NEEDINFO".
Comment 6 Björn Michaelsen 2011-12-23 17:01:29 UTC
needinfo keyword redundant by needinfo status.
Comment 7 sasha.libreoffice 2012-02-27 06:05:44 UTC
Guess that not yet implemented in 3.5.0. Change status to New.
Comment 8 Mike Kaganski 2022-04-07 19:25:25 UTC
Created attachment 179386 [details]
Print dialog for Mail Merge

I believe that it already allows that: if you push Pring in a MM document, the dialog allows you to create the filenames from a datasource field. If you need some combined name, you just configure your data source to have combined fields (e.g., using SQL to combine single fields together, or using formulas in spreadsheets when those are the data source).
Comment 9 Larsen 2022-04-08 07:47:08 UTC
Guess this has changed in the meantime of ten years. Thanks for pointing it out!
Comment 10 Mike Kaganski 2022-04-08 08:35:18 UTC
Created attachment 179404 [details]
StarOffice Mail Merge (Form Letter) dialog

(In reply to Larsen from comment #9)

Heh, it was available already in StarOffice 5.2 from 2000.