Skip to content

Dynamic Hyperlink with Mail Merge using CRM 2015

This is a quick post based on a question in the Microsoft Dynamics CRM Community forum.

Problem Statement: Can I dynamically add a hyperlink in a mail merge? The URLs are stored in a field on the CRM record. Need that URL to be added as hyperlink on an image.

Solution:
It is possible to add dynamic links coming in as merge fields to an image. To keep it simple, am adding the website field on account as a hyperlink in the merge document. You can use this feature to insert dynamic content for a campaign or something more useful.
Here???s how to do it:

  1. Select a few accounts and click ???Mail Merge???
     Select Accounts
  2. You can use a template if you have. I???m going to create a Blank document. Choose the data fields required. Make sure you add the URL field. In my case, the website field. Click OK followed by ???Download ??? button on the Mail Merge dialog.
    image
  3. You should have the word document similar to below. As instructed, enable the macros on the document
    image
  4. Click ???CRM??? in the Add-ins tab.
    image
  5. You will see the records we had selected in Step 1. Click OK.
    image
  6. Say that you want to distribute the high net worth accounts??? details to your key sales team. Add any text you want in the document and insert a picture (image). Right click the image to add a hyperlink.
    image
  7. In Insert Hyperlink dialog, enter some temporary text say ???TempURL??? for the Address. Click OK.
    image
  8. Now press ???ALT+F9??? to see the code in the mail merge document.
    image
  9. Delete the temporary text ???TempURL??? in the hyperlink and use the ???Insert Merge Field??? option to add the actual URL field.
    image
  10. Press ???ALT+F9??? to close the code. Now, select ???Edit Individual documents??? in ???Finish & Merge???.
    image 
  11. As seen in the tooltip, the URL is still showing the temporary text we had entered.  Unfortunately, Word isn???t refreshing the image link automatically. Press ???Ctrl+A??? to select all the contents of the document and then Press F9 to refresh.
    image
  12. Here is the result with all the dynamic address applied to the images!
    image

3 thoughts on “Dynamic Hyperlink with Mail Merge using CRM 2015”

  1. Thank you the workaround of saving this as a Word 97-2003 document worked. Apparently the functionality has been removed in Word 2013.

Leave a Reply to Ben Cancel reply

Your email address will not be published. Required fields are marked *