Mail merge manual field entry

Hi all,

I need to create a mail merge that will, I hope, be used with Salesforce for mail merge communications. I need to create a document with manually entered merge fields where the source database has not (and probably can not - at least with my current skills) be registered with LibreOffice. Salesforce is a web-based database service that has strict limits on connections outside of web browsers.

In short, what I'd like to do is create mailing labels, type in the merge fields as they need to be typed (to work with Salesforce), then save and upload the document. I can't find any way to do this. Is there a way? Also, Salesforce provides some templates for the merges and I can see what I need to do, but the fields they provide in their templates are not relevant to what I need, and I can't replace their merge fields with the ones I do need.

Thanks.

A related question, which may help me figure out what I need, is how does one manually work through a mail merge? I only see the wizard, but what if I've already created a document and just want to change a few fields? I don't want to have to enter a wizard and work through the entire thing just to edit that document. That function might also allow me to hand-enter field names for this merge document.

Carl

Hi :slight_smile:
I am not certain how to do this but it 'should' be fairly easy.  it probably isn't but it should be.

I am not sure if it makes a difference but do you happen to know the name of the back-end used by Salesforce?  Is it MySql?

There are some tutorials on using Base which might (or might not) help
http://www.spoken-tutorial.org/list_videos?view=1&foss=LibreOffice-Suite-Base&language=English
also a handbook
https://wiki.documentfoundation.org/Documentation/Publications#LibreOffice_Base_Handbook
and an FAQ
https://wiki.documentfoundation.org/Faq/Base

Hopefully someone on this list can either help directly or pinpoint more specific links found through the above or from elsewhere.
Good luck and regards from
Tom :slight_smile:

Hi Carl,

1) Create a Writer document template with the size of the label you require or use one of the pre-supplied label formats provided with LO.

2) In order to be able to include Database Field Names, you will need to

(a) be able to either connect directly from LO to the database server (using the GUI and a registered datasource or a macro to setup the database context)

OR

(b) insert "placeholders" or "user-defined" fields which will then have to be mapped to the data you can retrieve from your web interfaced database.

3) Alternatively, use some third party software to manipulate the corresponding ODF document directly (python, java tools, php, perl, etc). IMO, this may probably be easier in the long run if you don't require your users to manipulate file creation, ie., if everything is setup by an admin and doesn't require further user intervention other than launching a script.

Alex

Thanks, Tom. I've been away for a while. These links are handy, but on a quick look don't answer my questions. But...I'll keep looking.

Carl

Thank you Alex. I'll give your ideas some thought. The key issue for me is that I can manually enter "placeholders" for fields as text that Salesforce can interpret for the merge on their platform (well, I think I can but haven't been able to test it yet). What I can't do is enter any LO commands that trigger a next record or next page that Salesforce can interpret.

All that said, I still don't really understand how LO handles mail merges and it seems to be tailored to those who want to generate merges with a Calc spreadsheet (even that should be simpler IMHO) or a Base dB or a connected dB for someone who knows a little more.

Carl

Hi Carl,

Thank you Alex. I'll give your ideas some thought. The key issue for
me is that I can manually enter "placeholders" for fields as text that
Salesforce can interpret for the merge on their platform (well, I think
I can but haven't been able to test it yet). What I can't do is enter
any LO commands that trigger a next record or next page that Salesforce
can interpret.

In the old report designer, before the Oracle Report Builder was integrated, this was a feature of the report designer wizard, which inserted a NextRecord (hidden field as I recall) field into a Writer document and used variables to fill the form with data upon next opening/running of the query supplying data to the form. So, in theory, it should be attainable in some (possibly obscure) fashion.

All that said, I still don't really understand how LO handles mail
merges and it seems to be tailored to those who want to generate merges
with a Calc spreadsheet (even that should be simpler IMHO) or a Base dB
or a connected dB for someone who knows a little more.

Well, yes, that is what mailmerges are generally based on, some kind of datasource which can be displayed/imported as a spreadsheet or a db query, à la Excel for example, and then taking that datasource and providing the means to insert the data to provide the mailmerge. Your problem is that you don't have a datasource that LO can access. At a minimum, LO requires either a query, a view, a CSV file, or an Excel or LO spreadsheet. If you are using queries or views, then these have to be reachable via the database functionality of LO, which means that you have to have a corresponding connector or connection mechanism, e.g. via a Basic macro that will setup the connection to your remote database instance, execute the query, store the resultset in a stack or array of some kind in a form accessible to LO, and then allow you to proceed to mailmerge.

There is an extension that is supposed to help with mailmerges in AOO/LO and which doesn't use the built-in mailmerge functionality :

http://extensions.libreoffice.org/extension-center/mail-merge-db

Note however, that the author of the extension states that it requires a database in order to work (without specifying what kind of database). I also don't know whether this extension works with a current version of LO.

There is also the following :
http://extensions.openoffice.org/en/project/fastmailmerge

but I have no idea whether it works with LO. It requires at least a spreadsheet as a datasource in order to function.

Alex