From Accelerator Classic
Jump to: navigation, search
    • July 2018 - Microsoft Excel Mail Merge Released - Details below

The mail merge application is available for download from the Accelerator page on My CRM.

This application only runs on windows and requires Microsoft word to be installed on the client.

It registers a URI (custommailmerge:)

This can be used from the BrowserX app or by coding its use into CRM (using client-side script or ASP code)

The Parameter is the full CRM URL

 Example of a full link

This application is the replacement for how you mail merge from the IE toolbar.

One difference is that you can also edit/merge an existing document and re-upload this (as a new record) into CRM.

Mail Merge Application incorporates several other features from the IE toolbar, such as:

  • "Email Document" - Immediately process without the option to edit opening an email and embedding the document
  • "Email Mail Merge Attachment" - Completes the mail merge and opens an email attaching a PDF of the merged document
  • "Print Document" - Immediately print without the option to edit.
  • "Download Merge Data" - Allows you to save the data from a view to use when building a new Mail Merge document


Demo video at

Released 31 January 2017 as part of 4.5.3

To add in a Mail Merge button on a custom entity you just add in something like the following to the summary page:

var xurl = "custommailmerge:" + CRM.url("CTProjects/CTProjectsSummary.asp?J=CTProjects/CTProjectsFind.asp&E=CTProjects"); Container.AddButton(CRM.Button("Mail Merge","edit.gif",xurl, "CTProjects", "EDIT"));



Microsoft Excel Mail Merge

So new to Accelerator for Sage CRM(Release 24 July 2017) is the ability to use Microsoft Excel files as templates and merge CRM data to them

In the past Accelerator for Sage CRM has had client-side mail merge to Microsoft Word. Excel itself doesn’t have a mail merge function but the developer working on this was clever enough to use the #prefix_fieldname# (EG #oppo_description#, #comp_name#) to allow you create Excel files as templates and put these tags in which are then replaced with the actual data.

As with the Word merge you can specify any view in the CRM database to be used with a given template so this makes it really flexible.

I should also mention that with the mail merge app you can see existing documents (maybe previously merged and saved to Sage CRM) and get a copy of those and create a new version. So you don’t have to finish a document in one go and can use CRM to store versions of this document.

Excel Mail Merge Demo Video

To merge to line items you create a line item row and then insert a row above and in the first cell enter


This line below is used as a template and replicated for each item*.

  • the view used against the document must return a line for each item

The code for the buttons is in a file called ct_browserx.js

located on the CRM server at

  C:\Program Files (x86)\Sage\CRM\CRM\WWWRoot\js\custom

Mail Merge on Quotes/Orders

The views used for the quote and order items are


The item table should only have a header and a line that starts with with of the mail merge tags

 <<TableStart:QuoteItems>> or <<TableStart:OrderItems>>

DO not create a 3rd line for the totals as this will break the merge. Instead create a separate tab.