The Microsoft Dynamics CRM Blog
News and views from the Microsoft Dynamics CRM Team

MSCRM 4.0 Mail Merge Basics

MSCRM 4.0 Mail Merge Basics

  • Comments 51

All, this is my first blog and I am not sure if this is a good format or not. I am attempting to present the MSCRM 4.0 Mail Merge feature in a manner I hope to get you started right away.

A Little about MSCRM Mail Merge

Mail Merge in CRM was first implemented in version 3.0 and supported accounts, contacts and quotes. V3 templates existed but were difficult to work with. V3 did not support mail merge from the web client.

While MSCRM 4.0 Mail Merge is able to run on both the Outlook and the web clients, the Outlook client provides more functionality than the web client. Functionality the Outlook client provides over the web client is the ability to create activities associated with the mail merge (to help keep track of who received the merges), automatic upload or update of new or existing templates, the ability to create Quick Campaigns from the Mail Merge and the ability run Mail Merges from Quick Campaigns. These Quick Campaigns are containers for the activities created by the mail merge.

Another advantage the Outlook Client Mail Merge has over the Web Client Mail Merge is the use of a Visual Basic Macro to enable Mail Merge. Outlook Client Mail merge does not need the macro. MS Word, by default Macros are disabled and require enabling or trusting the MSCRM Mail Merge Macro.

Since the Outlook Client Mail Merge has the most functionality and is most interesting, this will be the focus of this blog.

Before you start

To start the user must have a Security Role that has the required Outlook privileges to operate the Outlook client and the ‘Mail Merge’ privilege set to a level appropriate with the level of access for the user. To use the web client on a mail merge the ‘Web Mail Merge’ privilege must also be set to the level of access for the user. While on the subject of privileges, the user should also have access to the entity for the mail merge (Accounts, Contacts, Leads, Opportunities, Quotes and Custom Entities) and any related entities that we might want to merge data from. Luckily, the MSCRM Team has some built-in Security Roles, like Marketing Manager, Sales Person, Receptionist, Customer Service Representative and Customer Service Manager, already have the settings for Mail Merge and Mail Merge Template creation.

Mail Merge Templates also require specific privileges; the Create, Read, Write, Delete, Assign and Share privileges set to a level appropriate with the level of access for the user.

Basic Outlook Mail Merge

With the exception of the first step, the steps below are intended to give the basic steps to perform an MSCRM Mail Merge from the Outlook Client, regardless of the point of invocation. For individual records, MSCRM Mail Merge can be invoked from the ‘Actions‘menu on an entity form. Sets of records returned by Advanced Find or included in a Mailing list are also points of MSCRM Mail Merge invocation.

  • Start the MSCRM Outlook client and navigate to the MSCRM Contacts page (we need a couple of contacts to start with). From the MSCRM Contacts page, select the contacts to include in the merge and click on the Mail Merge Icon (looks like a Word Symbol on a Page). This opens the Mail Merge form.

 clip_image002

  • From the Mail Merge form, select a mail merge type of Letter. Letters, E-mails, Envelopes and Labels are supported and this mail merge type corresponds to MSWord’s mail merge types, which will set for you when you enter the mail merge.
  • Select the radio button option for the ‘Organization mail merge template’ which will allow you to select the template to use. Click on the Look-Up Icon and from the Look-Up Records dialog and select a mail merge template to use for this merge.
  • Templates are either Organization (available to other users) or Personal. When saving a template from a mail merge the default is set to personal. This can be changed in the Mail Merge Template form or from the Mail Merge Template grid (Settings | Templates | Mail Merge Templates).

 clip_image004

  • At this point we can click the OK button to start the merge (opens MSWord).

          - The Merge section changes what records can be used for the merge.

          -  The Data Fields button opens the Add Columns dialog, where additional entity and related entity fields can be selected to be included in the mail merge. Note: There is a 62 field limit and some juggling may be required to uncheck fields you will not use and check fields you require.

 clip_image006

  • The first time a Mail Merge Template is opened a Macro Alert will be displayed. Set Word to allow macros to run and click on the CRM Mail Merge Icon to run the Macro.
  • After the Macro runs, Word’s ‘Select Recipients’ dialog will appear. Click the OK button to continue with Mail Merge from the Wizard located in the task pane.
  • Click ‘Next: Preview your letters’ to view the merge before printing. The ‘Preview your letters’ section has buttons that can be used to view each of the letters we are merging.

         - With the exception of Envelopes and Labels, the ‘Write your letter’ will be visible. At this point you can add text and/or additional fields to the mail merge document from the ‘More Items…’ hyperlink or from Word’s Mailing menu.

         - Mail Merge Field tags can be identified by the beginning ‘<<’ and ending ‘>>’ characters. To see field details use the Ctrl + F9 to toggle the field markers.

  • Click ‘Next: Complete the merge’ to navigate to the ‘Complete the Merge’ task pane. In the Merge section, click the ‘Print’ item to open the ‘Merge to printer’ dialog.

          - Optionally, from the Outlook Client only, the ‘Upload Template to CRM’ item should be visible. From this option, you can update the template you started with (assuming correct privileges) by clicking the ‘Yes’ button or create a new one by clicking the ‘No’ button. Cancel will stop the operation all together.

clip_image008

          - You can create a template for later use then continue with the merge. If you are creating a new document from scratch, use the Blank Document option and just write the letter, preview it with entity data and upload the template. You can then just quit word and not save changes as the changes were uploaded as a new template.

  • From the ‘Merge to printer’ dialog click the OK button to allow all selected records to be merged and to open the ‘Print’ dialog.
  • From the ‘Print’ dialog, select the appropriate printer and other printer related options. Click the OK button to open the ‘Create Activities’ dialog and start the merge.
  • Select the ‘Create Microsoft Dynamics CRM activities’ radio button and click the ‘Activities Details’ button to open the activity detail form.

 clip_image010

Note: From the ‘Create Activities’ dialog, click the OK button to print the merge without creating activities (default settings).

          - The ‘Assign activities to’ section defaults to assigning the activities to self, change to assign to owners of the records in the merge or to another user or queue.

          - The ‘Automatically close the activities as completed is set by default.

          - The ‘Create a new quick campaign’ check box will enable mail merge to create a quick campaign that will contain the mail merge activities created. A ‘Name’ for the quick campaign must be included.

  • From the ‘Activity Details’ form, change some fields on the form to suit your needs and click the OK button. This is a generic activity form and may not resemble the form for the object you are creating. The activity created will have a note tab with a hyperlink to the merge document created for future reference.

clip_image012

  • From the ‘Create Activities’ dialog, click the OK button to print the merge
  • When all printing is completed, the ‘Microsoft Dynamics CRM for Outlook dialog will appear, indicating that the mail merge is complete. Click the OK button.

 clip_image014

  • You can now close Word.

Note: Another ‘Microsoft Dynamics CRM for Outlook dialog will appear to verify you want to leave mail merge. MS Word will also display a dialog asking if you want to save changes to the current document.

 clip_image016

  • Mail Merge is now complete. You can verify the Mail Merge records by navigating to the Contacts included in the Mail Merge and clicking the History tab (if the activities were not created as completed, they will not appear in the history grid).

Conclusion

While, MSCRM Mail Merge does not have the ability to add attachments to the document you are sending, you could include some of the data you want as part of the template. Instead of an attachment you could include a URL link which is accepted by the process and makes your e-mail lighter anyway.

Arne Marquez

  • PingBack from http://msdnrss.thecoderblogs.com/2008/01/15/mscrm-40-mail-merge-basics/

  • PingBack from http://freedombloghost.info/?p=1845

  • New post at blogs.msdn.com

  • Hi

    Does CRM 4.0 allow for multiple quote products or multiple line items to be merged into a Word document in one single table.

    We attempted to do this and each quote product appeared on a second page.

    Thanks

    Tony

  • Tony,

    Yes CRM 4.0 Mail Merge does support multiple quote products, both existing (from the product catalog) and write-in (not defined in the product catalog) products.

    MSWord calls this type of merge a directory merge and before attempting to create your own merge template, you should attempt the merge using our sample "Quote for Customer" template.  With our sample template open, you can use the 'Alt + F9' key sequence to see the structure of the template.  Note: Some calculations will be required to get some of the summary fields your organization requires for the quote document.

    The main difference between the directory merge and the typical letter or email merges, is the quote products are merged into a final document in MSWord's "Complete the Merge" task pane.  After the quote products are merged into the final document, this document can be printed out.

    MSCRM does a good job of getting the data to MSWord for the merge, but to create the quote template (our most complex sample template), a good deal of MSWord knowlege is required.

    Hope this helps out.

    Arne

  • Hi Arne

    Thanks so much for getting back to me. It's good news to hear that CRM 4.0 supports multiple quote products.

    I just have to figure out how to do this. You mentioned that there is a 'Quote for customer' template.

    I am not sure if I am looking in the wrong place but I assume this is the template used in your example? Is there an actual template?

    Thanks again

    Tony

  • Tony,

    The sample templates that get installe with MSCRM 4.0 should be accessible from the 'Start with' section of the Mail Merge form.  Select the 'Organization mail merge template' radio button and click on the look-up icon to the far right.  This will bring up the Look-Up Records dialog for organizational templates.  If there are no templates, check with your system administrator.  Ask specifically for the "Quote for Customer" mail merge template.

    Another method to look for the template is to Navigate to the Mail Merge Templates grid. From the MSCRM Navigation tree, first click on 'Settings', then, from the Settings page, click on 'Templates', then from the Templates page, click on Mail Merge Templates.  The default 'View' is 'My Active Mail Merge Templates'.  Change the 'View' to 'All Mail Merge Templates'.

    Quotes are MSWord Directory Merge and is, in my opinion, one of the most advanced merges you could undertake.  The intent of my blog was to present the basics of mail merge from MSCRM 4.0.  Maybe this could be a future blog.

    Hope this helps.

    Arne

  • One thing I have observed is if I have a CRM merge template document that is based on a (trusted) 'word template' document with macros (.dotm file), the macros in the base template document are somehow 'not enabled' after the merge is completed UNLESS one goes into the VBA editor and runs the macros from there.

    Example: Create a .dotm with a macro and store it in a trusted (by word) location.

    Create a CRM document in word BASED on the .dotm template above. Save the CRM document as .XML, and put it in the CRM system.

    Run the mail merge on that document. When Word starts up, do the Finish merge and use the Edit in new document' option so you have a merged document that you want to run the macro against (to fill in more data for example).

    This generated document will be correctly based on the .DOTM word template, and the macros appear in the macro list, but if you run the macros, NOTHING HAPPENS (no message and no result of the macro).

    If you start the VBA editor, you can see the macro. If you run the macro from the VBA editor, it runs successfully.

    A mystery to me. Posted in case you can share some light on this.

  • I'm trying to use mail merge in CRM4 for the first time using the web application rather than outlook client, with CRM3 we used an add-in and I'm trying to determine if we still need this. For example, I'd like to send a letter to a customer quoting information populated directly from the customers case.  Do you know if this is possible in CRM4 web application please and if so how I might go about it?

    Thanks

    Sarah

  • The case of the mystery macro… The macro is used for the MSCRM web client implementation of Mail Merge, if you use the Outlook client, you do not need to worry about the macro settings.  We support Mail Merge from Office 2003 and 2007.  Since the macro handling is different between the two versions, it is easy to see there can be some confusion.  Personally, I prefer maintaining a high level of security for macros, which means I use the default settings in Word.

    In Word 2007, when opening the MSCRM Mail Merge document, there is a security warning that appears below the ribbon.  I click the ‘Options’ button and when the ‘Microsoft Office Security Options’ dialog appears I simply select the ‘Enable this Content’ option and click the ‘OK’ button.  After the macro is enabled, you can click on the ‘CRM’ icon in the ‘Add-Ins’ tab on Word’s ribbon.

    In Word 2003, a ‘Security Warning’ dialog appears.  I check the ‘Always trust macros from this publisher’, which enables the ‘Enable Macros’ button which allows the content to be used.  After the macro is enabled, you can then run the macro by clicking the ‘CRM’ icon in Word’s tool bar.

    Since there are so many macro options, it is difficult to say what the behavior of the macro is with other settings, but this method works.  Hope this helps.

    Arne

  • Sorry to say, there is no Mail Merge support for MSCRM Cases.  Might be an interesting add for the next version of MSCRM.  For the everyday user, new in MSCRM 4.0 is workflow. I am not a workflow  expert, so I will not be able to give step by step instructions.

    One of the cool things about workflow is that you can send email based on text you enter and you have access to the MSCRM Object Fields.  You might try creating a workflow that is triggered by hand or when a Case is created.  These workflows, depending on your security role can be created to be used only by you or others in your organization.

    Hope this helps.

    Arne

  • Hi Arne,

           Thanks for your response, it's a pity there is no mail merge support for MSCRM Cases. I would be delighted if we could use email instead but I'm afraid some of our customers insist on letters about their cases and the bespoke system we are replacing auto-generates these letters and needless to say the users want the new system (based on CRM 4) to do the same or better.

    I'd be happy to hear any other ideas for how to tackle this?

    Thanks

    Sarah

  • Hi Arne

    I can't seem to get it to work,when merging from CRM 4.0 til Word 2003. Word cannot find the datasource and i order to continue, I have to click on remove mergeinformation (my version is in danish, so I'm guessing here). I get a CRM toolbar button and acces to the fields fra CRM, but I don't get to choose to save the merge as an activity. Any suggestions?

    Regards, Jens

  • Hi Arne

    Does this apply to Word 2003? I can't get it to work the way you describe.

    Question: When you create a template in Word, save as .xml and import into CRM, you assign is to an entity. How do you get the CRM-fields you've referenced in the template to actually connect to the template? I hope You won't say by hand, each time...

    Regards, Jens

  • Hi Arne,

    Could you confirm a coupke of things

    1. Activities can only created when you merge using Outlook rather than the web client

    2. The merged documents is not stored with the activity there unless the user saves it somewhere we do not know what was in the dcoument

    Thanks

    Joe

Page 1 of 4 (51 items) 1234
Leave a Comment
  • Please add 4 and 3 and type the answer here:
  • Post