<?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 Produce Email and save in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Produce-Email-and-save/m-p/1328097#M410620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a piece of code that takes a report i've exported, creates a generic e-mail, attaches the report and waits for me to send the e-mail in Outlook. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i'm producing multiple reports this soon becomes overwhelming so let me ask you - is there any way to save this e-mail rather than displaying it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out my code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sub Emailtest&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Recipient = "Test"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CC = "Test_CC"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Company_Name = "CompanyTest"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ReportTitle = "TitleTest"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ExportFilePath = "H:\test.xlsx"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'----------------------------------------------------------&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'Create e-mail body in HTML&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EmailBody = "&amp;lt;font face = " &amp;amp; Chr(34) &amp;amp; "Calibri" &amp;amp; Chr(34) &amp;amp; "&amp;gt;" &amp;amp;_&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Hi there &amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt; Please find attached the&amp;nbsp; " &amp;amp; ReportTitle &amp;amp; " " &amp;amp;_&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;" as per schedule.&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt; Hope its okay! &amp;lt;/FONT&amp;gt;"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'----------------------------------------------------------&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'Setup the e-mail&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myApp = CreateObject ("Outlook.Application")&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myMessage = myApp.CreateItem(olMailItem)&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.body = ("EmailBody")&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.HTMLBODY = EmailBody&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.BodyFormat = 2 'HTMLFormat&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.To = Recipient&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.CC = CC&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.Subject = Report_Title&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.Attachments.Add(ExportFilePath)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myInspector = myMessage.GetInspector 'add signature to e-mail&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myDoc = myInspector.WordEditor&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.Display&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myMessage = Nothing&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myApp = Nothing&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myInspector = Nothing&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myDoc = Nothing&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End sub&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 May 2017 14:24:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-11T14:24:32Z</dc:date>
    <item>
      <title>Produce Email and save</title>
      <link>https://community.qlik.com/t5/QlikView/Produce-Email-and-save/m-p/1328097#M410620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a piece of code that takes a report i've exported, creates a generic e-mail, attaches the report and waits for me to send the e-mail in Outlook. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i'm producing multiple reports this soon becomes overwhelming so let me ask you - is there any way to save this e-mail rather than displaying it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out my code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sub Emailtest&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Recipient = "Test"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CC = "Test_CC"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Company_Name = "CompanyTest"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ReportTitle = "TitleTest"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ExportFilePath = "H:\test.xlsx"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'----------------------------------------------------------&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'Create e-mail body in HTML&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EmailBody = "&amp;lt;font face = " &amp;amp; Chr(34) &amp;amp; "Calibri" &amp;amp; Chr(34) &amp;amp; "&amp;gt;" &amp;amp;_&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Hi there &amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt; Please find attached the&amp;nbsp; " &amp;amp; ReportTitle &amp;amp; " " &amp;amp;_&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;" as per schedule.&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt; Hope its okay! &amp;lt;/FONT&amp;gt;"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'----------------------------------------------------------&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'Setup the e-mail&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myApp = CreateObject ("Outlook.Application")&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myMessage = myApp.CreateItem(olMailItem)&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.body = ("EmailBody")&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.HTMLBODY = EmailBody&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.BodyFormat = 2 'HTMLFormat&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.To = Recipient&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.CC = CC&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.Subject = Report_Title&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.Attachments.Add(ExportFilePath)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myInspector = myMessage.GetInspector 'add signature to e-mail&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myDoc = myInspector.WordEditor&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;myMessage.Display&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myMessage = Nothing&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myApp = Nothing&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myInspector = Nothing&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set myDoc = Nothing&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End sub&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 14:24:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Produce-Email-and-save/m-p/1328097#M410620</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-11T14:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Produce Email and save</title>
      <link>https://community.qlik.com/t5/QlikView/Produce-Email-and-save/m-p/1328098#M410621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub Emailtest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Recipient = "Test"&lt;/P&gt;&lt;P&gt;CC = "Test_CC"&lt;/P&gt;&lt;P&gt;Company_Name = "CompanyTest"&lt;/P&gt;&lt;P&gt;ReportTitle = "TitleTest"&lt;/P&gt;&lt;P&gt;ExportFilePath = "C:\Users\Tamilarasu.Nagaraj\Desktop\Philpp\Sheet Wild card.xlsx"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'----------------------------------------------------------&lt;/P&gt;&lt;P&gt;'Create e-mail body in HTML&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EmailBody = "&amp;lt;font face = " &amp;amp; Chr(34) &amp;amp; "Calibri" &amp;amp; Chr(34) &amp;amp; "&amp;gt;" &amp;amp;_&lt;/P&gt;&lt;P&gt;"Hi there &amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt; Please find attached the&amp;nbsp; " &amp;amp; ReportTitle &amp;amp; " " &amp;amp;_&lt;/P&gt;&lt;P&gt;" as per schedule.&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt; Hope its okay! &amp;lt;/FONT&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'----------------------------------------------------------&lt;/P&gt;&lt;P&gt;'Setup the e-mail&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set myApp = CreateObject ("Outlook.Application")&lt;/P&gt;&lt;P&gt;Set myMessage = myApp.CreateItem(olMailItem)&lt;/P&gt;&lt;P&gt;myMessage.body = ("EmailBody")&lt;/P&gt;&lt;P&gt;myMessage.HTMLBODY = EmailBody&lt;/P&gt;&lt;P&gt;myMessage.BodyFormat = 2 'HTMLFormat&lt;/P&gt;&lt;P&gt;myMessage.To = Recipient&lt;/P&gt;&lt;P&gt;myMessage.CC = CC&lt;/P&gt;&lt;P&gt;myMessage.Subject = ReportTitle&lt;/P&gt;&lt;P&gt;myMessage.Attachments.Add(ExportFilePath)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set myInspector = myMessage.GetInspector 'add signature to e-mail&lt;/P&gt;&lt;P&gt;Set myDoc = myInspector.WordEditor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;myMessage.Display&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: #ff0000;"&gt;'Comment this line if you don't want to see outlook draft window&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;&lt;STRONG&gt;myMessage.Save&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;myMessage.Close olPromtForSave&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set myMessage = Nothing&lt;/P&gt;&lt;P&gt;Set myApp = Nothing&lt;/P&gt;&lt;P&gt;Set myInspector = Nothing&lt;/P&gt;&lt;P&gt;Set myDoc = Nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 15:06:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Produce-Email-and-save/m-p/1328098#M410621</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2017-05-11T15:06:07Z</dc:date>
    </item>
  </channel>
</rss>

