Harris Technology Blogs

RSS Subscribe

Subscribe via Email

Your email:

Company Blog

Current Articles | RSS Feed RSS Feed

Suppressing Address 2 Field in Microsoft Dynamics CRM 2011 Mail Merge

  
  
  
  
  

Frequently in Microsoft Dynamic CRM mail merges that involve addresses, there is a second line for the street address. This second line is normally used for a suite or apartment number. But what happens to our merge when no data exists for that merge field? We need to eliminate the blank line from our mail merge if the field is empty.

Let's walk through the steps of creating a Microsoft Dynamics CRM 2011 (Outlook client) mail merge template and we will suppress the Address 2 field if the data is empty. We are using Microsoft Office Word 2010 in this example.

First let's start with creating a basic mail merge template:

  1. In the Microsoft Dynamics CRM folder list, expand the Settings folder, and click Templates. Select the option Mail Merge Templates.

  2. In the grid toolbar, click New to create the new mail merge template.

     New Mail Merge Template Button

  3.  The Mail Merge Template:New form opens. Enter a "friendly" name and description if needed.

  4. In this example we would like this mail merge template to be available from the contact record. From the drop-down list in the Associated Entity field, select Contact.

    Associated Entity CONTACTS resized 600

  5.  Before we can continue, we are required to Save.

    SAVE Template resized 600

  6.  Once you select Save, you will see the warning that no document has been attached and this record can not be used for mail merge unless it has a Microsoft Word document saved as an XML file. Also notice we now have the option on the toolbar to Create Template in Word. But let's add some additional data fields before we go into Microsoft Word.

    XML warning resized 600

  7.  In the bottom left hand corner of this form, select the Data Fields button.

    Additional Data Fields resized 600

  8.  You can have a maximum of 62 data fields for your mail merge. The Record Type by default is displaying the fields available from the Contact entity. In this example we have selected the contact's first name and last name.

    Contact Data Fields resized 600

  9.  Once all the fields have been selected for your mail merge, click OK and from the toolbar click the Create Template in Word.

  10. Microsoft Word launches.

  11. In the Mail Merge Recipients dialog box, you will need to select the OK to confirm the data source for your mail merge.

    CRM Data Source

  12. A blank document is now available for you to create your letter.

  13. Under the Mailings tab, click the Address Block field.

    Address Block field resized 600

  14.  Using the Address Block field we can specify address elements for this template and Correct Problems with Match Fields.

    Specify Address Elements resized 600

    Match Fields resized 600

  15. Continue inserting fields using the Insert Merge Field.

    Insert Merge Field resized 600

  16. All the inserted data fields in your document will be highlighted as shown below:

    Highlighted Data Fields resized 600

  17. Once you have completed your letter, from the File menu, click Save. You must save your letter as a XML document.

    Save XML resized 600

  18. Close Microsoft Word. You will be prompted to stop the current mail merge. Select OK.

    Stop Mail Merge resized 600

  19. In Microsoft Dynamics CRM, browse for the newly saved document and attach it to the record.

    Browse and Attach resized 600

  20. Click Save and Close. The template is now ready for use.

Now let's merge the template for a contact record. In this example, the contact's address only has data in the Street 1 field, the 2nd line is empty.

  1. In Microsoft Dynamics CRM browse to a contact record.

    CRM Contact Record resized 600

  2. Click on the Mail Merge button.

    CRM Mail Merge resized 600

  3.  The Microsoft Dynamics CRM Mail Merge for Microsoft Office Word dialog box opens. In the section "Start with a:" select the option Personal mail merge template and browse to select the template name. By default the templates are individually owned unless you publish it to the organization.

    Mail Merge Options resized 600

  4.  Select the OK.

  5. Microsoft Word launches and the Mail Merge Recipients dialog box opens displaying the list of recipients that will be used in the mail merge. Click the OK button.

  6. To preview the merge, click Finish & Merge.

    describe the image

  7. You have a couple of options once you merge: Edit Individual Documents or Print Documents. Notice below the 2nd Address line has been suppressed.

    Merge Letter Example resized 600

  8. Close Microsoft Word after completing your merge and printing the letter.

We know training takes time...valuable time from your busy day. We are excited to offer at NO CHARGE micro-training sessions on Microsoft Dynamics CRM 2011. These sessions are never longer than 30 minutes and focus on one or two practical tips. For more information on these sessions, click here.

 

Comments

There are no comments on this article.
Comments have been closed for this article.