<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Send Chart in body using CDO.Message in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475255#M177442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Vikas, sorry for the delayed response... but this worked beautifully!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Sep 2014 15:43:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-17T15:43:47Z</dc:date>
    <item>
      <title>Send Chart in body using CDO.Message</title>
      <link>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475251#M177438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to automate sending a daily email using vbscript that contains one chart in the body of the email.&amp;nbsp; I have it working great locally where I can use Outlook by using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13867960306214821" jivemacro_uid="_13867960306214821"&gt;
&lt;P&gt;sub DailyMailLocal&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Set myOutlook = CreateObject ("Outlook.Application")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Set myMessage = myOutlook.CreateItem(olMailItem) &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myMessage.BodyFormat = 2 'HTMLFormat&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; myMessage.To = "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:testemailaddress@host.com"&gt;testemailaddress@host.com&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myMessage.Subject = "Qlikview Email Testing"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Set myInspector = myMessage.GetInspector&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Set myDoc = myInspector.WordEditor&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myInspector.WordEditor.Content.InsertBefore chr(13)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ActiveDocument.GetSheetObject("CH154").CopyTableToClipboard TRUE&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myDoc.Range(1,1).Paste&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myInspector.WordEditor.Content.InsertAfter chr(13) &lt;/P&gt;
&lt;P&gt;&amp;nbsp; myMessage.Display&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Set myMessage = Nothing&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Set myApp = Nothing&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Set myInspector = Nothing&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Set myDoc = Nothing&lt;/P&gt;
&lt;P&gt;end sub&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this be recreated using CDO.Message?&amp;nbsp; I have the below working where the excel file is attached to the message.&amp;nbsp; But what I require is the above result with the chart as HTML body in the email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_1386796065291658 jive_macro_code" jivemacro_uid="_1386796065291658"&gt;
&lt;P&gt;Sub DailyMailServer&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Set obj = ActiveDocument.GetSheetObject("CH154")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;obj.ExportEx "C:\Users\vercillo\Documents\Temp.htm",5&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Set myMail = CreateObject("CDO.Message")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myMail.Subject = "QlikView Email Testing"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myMail.From = "&lt;EM&gt;&lt;A class="jive-link-email-small" href="mailto:testemailaddress@host.com"&gt;testemailaddress@host.com&lt;/A&gt;&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myMail.To = "&lt;EM&gt;&lt;A class="jive-link-email-small" href="mailto:testemailaddress@host.com"&gt;testemailaddress@host.com&lt;/A&gt;&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;myMail.AddRelatedBodyPart "C:\Users\vercillo\Documents\Temp.xls", "Temp.xls", 0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myMail.Configuration.Fields.Item _&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; ("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/sendusing"&gt;http://schemas.microsoft.com/cdo/configuration/sendusing&lt;/A&gt;&lt;SPAN&gt;")= 2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myMail.Configuration.Fields.Item _&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; ("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"&gt;http://schemas.microsoft.com/cdo/configuration/smtpauthenticate&lt;/A&gt;&lt;SPAN&gt;") = 0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myMail.Configuration.Fields.Item _&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; ("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/smtpserver"&gt;http://schemas.microsoft.com/cdo/configuration/smtpserver&lt;/A&gt;&lt;SPAN&gt;") = "mailhost.test.com"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myMail.Configuration.Fields.Item _&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; ("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/smtpserverport"&gt;http://schemas.microsoft.com/cdo/configuration/smtpserverport&lt;/A&gt;&lt;SPAN&gt;") = 25&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myMail.Configuration.Fields.Update&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; myMail.Send&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set myMail = nothing&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set&amp;nbsp; obj = nothing&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated, and I hope these working code snips might help someone!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 21:10:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475251#M177438</guid>
      <dc:creator />
      <dc:date>2013-12-11T21:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Send Chart in body using CDO.Message</title>
      <link>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475252#M177439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You got any improvement in this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 01:34:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475252#M177439</guid>
      <dc:creator>gainkarthi</dc:creator>
      <dc:date>2014-03-04T01:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Send Chart in body using CDO.Message</title>
      <link>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475253#M177440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, I ended up going with the less than ideal file as an attachment option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 18:12:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475253#M177440</guid>
      <dc:creator />
      <dc:date>2014-05-01T18:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Send Chart in body using CDO.Message</title>
      <link>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475254#M177441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; set cs = ActiveDocument.GetSheetObject("CH663")&lt;/P&gt;&lt;P&gt; cs.ExportHtml "d:\tmp\sales.html"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;objEmail.CreateMHTMLBody "file://d:\tmp\sales.html"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 07:12:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475254#M177441</guid>
      <dc:creator>vikasmahajan</dc:creator>
      <dc:date>2014-05-02T07:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Send Chart in body using CDO.Message</title>
      <link>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475255#M177442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Vikas, sorry for the delayed response... but this worked beautifully!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 15:43:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475255#M177442</guid>
      <dc:creator />
      <dc:date>2014-09-17T15:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Send Chart in body using CDO.Message</title>
      <link>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475256#M177443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Problem ,WelCome &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 03:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475256#M177443</guid>
      <dc:creator>vikasmahajan</dc:creator>
      <dc:date>2014-09-18T03:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Send Chart in body using CDO.Message</title>
      <link>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475257#M177444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vikas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I do this for multiple objects?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my requirement is to send multiple charts in email body. I even tried copying sheet with all these charts in mail body but that doesn't work. Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Neha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 13:35:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475257#M177444</guid>
      <dc:creator>nesawant</dc:creator>
      <dc:date>2017-05-23T13:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Send Chart in body using CDO.Message</title>
      <link>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475258#M177445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you embedded the charts in message body if 2 or 3&amp;nbsp; but it is advised that create a pdf and attached with message send it to user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 May 2017 04:40:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Send-Chart-in-body-using-CDO-Message/m-p/475258#M177445</guid>
      <dc:creator>vikasmahajan</dc:creator>
      <dc:date>2017-05-24T04:40:18Z</dc:date>
    </item>
  </channel>
</rss>

