<?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: Passing Variables into Macro to open outlook in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Passing-Variables-into-Macro-to-open-outlook/m-p/930148#M321670</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi shree,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have you thought about doing this as a mailto link instead of using a macro?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alternatively add this to your macro code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set macroVariable = ActiveDocument.GetVariable("yourVariableName")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use marcroVariable.GetContent.String to retrieve the variable's contents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Dec 2015 15:09:16 GMT</pubDate>
    <dc:creator>marcus_malinow</dc:creator>
    <dc:date>2015-12-15T15:09:16Z</dc:date>
    <item>
      <title>Passing Variables into Macro to open outlook</title>
      <link>https://community.qlik.com/t5/QlikView/Passing-Variables-into-Macro-to-open-outlook/m-p/930147#M321669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks , I have a scenario where i want to pass&amp;nbsp; the list of variables into macro.&lt;/P&gt;&lt;P&gt;I want to add an email to macro, so when the user clicks on the button it should open the outlook with the provided email.&lt;/P&gt;&lt;P&gt;This works fine, now i want to pass these emails by a variable . How can i acheive that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the Macro :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub OpenOutlook()&lt;/P&gt;&lt;P&gt;dim objOutlk 'Outlook&lt;/P&gt;&lt;P&gt;dim objMail 'Email item&lt;/P&gt;&lt;P&gt;dim strMsg&lt;/P&gt;&lt;P&gt;const olMailItem = 0&lt;/P&gt;&lt;P&gt;'Create a new message&lt;/P&gt;&lt;P&gt;&amp;nbsp; set objOutlk = createobject("Outlook.Application")&lt;/P&gt;&lt;P&gt;&amp;nbsp; set objMail = objOutlk.createitem(olMailItem)&lt;/P&gt;&lt;P&gt;&amp;nbsp; objMail.To = "abc@ xyz.com"&amp;nbsp; '&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt; Here i am passing the email address manually , how can i pass with a variable&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; objMail.cc = "" 'Enter an address here to include a carbon copy; bcc is for blind carbon copy's&lt;/P&gt;&lt;P&gt;'Set up Subject Line&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'objMail.subject = "I hope this helps!! "&lt;/P&gt;&lt;P&gt;'Add the body&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; strMsg = "Good luck" &amp;amp; vbcrlf&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'To add an attachment, use:&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'objMail.attachments.add("C:\MyAttachmentFile.txt")&lt;/P&gt;&lt;P&gt;&amp;nbsp; objMail.body = strMsg&lt;/P&gt;&lt;P&gt;&amp;nbsp; objMail.display 'Use this to display before sending, otherwise call objMail.Send to send without reviewing&lt;/P&gt;&lt;P&gt;'Clean up&lt;/P&gt;&lt;P&gt;set objMail = nothing&lt;/P&gt;&lt;P&gt;set objOutlk = nothing&lt;/P&gt;&lt;P&gt;End sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2015 14:57:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Passing-Variables-into-Macro-to-open-outlook/m-p/930147#M321669</guid>
      <dc:creator>shree909</dc:creator>
      <dc:date>2015-12-15T14:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Variables into Macro to open outlook</title>
      <link>https://community.qlik.com/t5/QlikView/Passing-Variables-into-Macro-to-open-outlook/m-p/930148#M321670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi shree,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have you thought about doing this as a mailto link instead of using a macro?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alternatively add this to your macro code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set macroVariable = ActiveDocument.GetVariable("yourVariableName")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use marcroVariable.GetContent.String to retrieve the variable's contents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2015 15:09:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Passing-Variables-into-Macro-to-open-outlook/m-p/930148#M321670</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2015-12-15T15:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Variables into Macro to open outlook</title>
      <link>https://community.qlik.com/t5/QlikView/Passing-Variables-into-Macro-to-open-outlook/m-p/930149#M321671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response, &lt;/P&gt;&lt;P&gt;can you please provide a sample file with working..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2015 16:32:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Passing-Variables-into-Macro-to-open-outlook/m-p/930149#M321671</guid>
      <dc:creator>shree909</dc:creator>
      <dc:date>2015-12-15T16:32:19Z</dc:date>
    </item>
  </channel>
</rss>

