Mail Merge In Libreoffice Writer

Posted onby admin

Steps To Do Mail Merge In Libreoffice Writer

Using Mail Merge. The Mail Merge process involves three main steps. Connecting the data source with the source document; Inserting the table fields to the document; Produce the output (or merge) the documents. Connecting the data source. Open the source document and choose Edit Exchange Database menu item. This command opens the Exchange Database window. Mail Merge Wizard Starts the Mail Merge Wizard to create form letters or send e-mail messages to many recipients. The source for your mail merge, while leaving your existing systems alone. Make sure that you have saved the spreadsheet, since it is the saved data that will be referenced when merging from it. Register with LibreOffice To register the data source, you have to be in Writer, so this is best done when writing the letter to contain the customised.

Hi everyone! Thank you for visiting the blog post. I’m Asha Sulaiman from Sri Lanka. I’m a final year undergraduate at University of Moratuwa following the Information Technology and Management degree programme. Currently I’m a student developer at CiviCRM working on the project integrating CiviCRM with LibreOffice in order to perform the mail merge operation.

Mail merge is a most beneficial feature if you want to create many similar documents in which the formatting and much of the text are the same, but one or more things are unique for each document such as name, address etc. To achieve this task, the project aim is to develop an extension to write a letter to a contact/contacts with LibreOffice instead of using PDF-letter. There are many benefits you can obtain by using this extension,

  • You can directly upload a LibreOffice writer document with necessary tokens to perform the mail merge operation.
  • Image resolution will not reduce in the merged document.
  • Merged file will not be corrupted.
  • You can edit the merged document as per your wish.

However from my mentor’s guidance I have found an already developed extension which does a similar task using Microsoft Word instead of LibreOffice ( and this has changed my project direction. The most beneficial part of open source is that we don’t want to build everything from scratch. If we found some already inbuilt open source solutions we can use it, build on top of it to make it more powerful. So we plan to enhance the extension which not only works with Microsoft Word and LibreOffice Writer but also to work with Microsoft Excel and LibreOffice Calc too.

As the initial step I tried to make the word mail merge extension work with CiviCRM latest version 5.26.0. As this breaks in the latest releases I made a contribution to resolve this issue. (

In the second week with my mentor's guidance I enhanced the extension to make the integration between CiviCRM and LibreOffice Writer to perform the mail merge operation.


How to install the extension

  1. Pull the latest release from
  2. place the folder inside your configured extensions directory.
  3. When you reload the Manage Extensions page the new “Word Mail Merge” extension should be listed with an install link.
  4. Proceed with install.


  1. Create your own Template LibreOffice Writer document using the necessary tokens.
  2. Navigate to 'Mailings'->'Message Templates'.
  3. Click 'Add Message Template'
  4. Give a name for your new template in the 'Message Title' field in the New Message Template form.
  5. Click the 'Upload Document' radio button in the Source section.
  6. Attach your odt template in the 'Upload Document' section.
  7. Select the LibreOffice template from the mail merge drop down and tick the ‘Enabled ?’ checkbox.
  8. Click save


Mail Merge In Libreoffice Writer

I would like to take this opportunity to thank my mentor Parvez Saleh for his constant support and guidance.

Mail Merge In Libreoffice Writer In Malayalam

If you have any feedback or suggestions, that would be much appreciated :)

Mail merge toolbar in libreoffice writer

Mail Merge In Libreoffice Writer Online