locked
Open an Email Activity in Outlook from Dynamics CRM 2011 Formatting issue RRS feed

  • Question

  • when i try to reply Email Activity in Outlook from Dynamics CRM 2011, body is showing html format, it is not showing in text format.

    Formatting issue. how i can display text in outlook as plan text format not like htm formate.

    Thanks,

    Qaisar

    Monday, October 28, 2013 7:28 AM

Answers

  • User can open every Email Activity in outlook. There are some basic requirements for opening Email Activity in the outlook.

    1. Note: To open email in Outlook, Outlook needs to be up and running.

    2. Important: As this code utilizes the “ActiveXObject”, it will only work if using Internet Explorer.

    function OpenEmail(To, Subject, Body) {

       try {

           var theApp = new ActiveXObject("Outlook.Application");

           var objNS = theApp.GetNameSpace('MAPI');

           // value 0 = MailItem

           var theMailItem = theApp.CreateItem(0)

           //Bind the variables with the email

           theMailItem.to = To;

           //"Subject";

           theMailItem.Subject = Subject;

           // "Body";

           //theMailItem.Body = Body;

           theMailItem.HTMLBody = Body;

           //Show the mail before sending for review purpose

           theMailItem.display();

           //You can directly use the theMailItem.send() function

           //if you do not want to preview the message first.

       }

       catch (err) {

           alert(err);

       }

    }

    Friday, November 22, 2013 6:15 AM