<?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 Execute Macro after finishing document load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850380#M1009410</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a QlikView document which contains an object with images and emoticons.&lt;/P&gt;&lt;P&gt;I developed a vbscript Macro with 3 steps : &lt;/P&gt;&lt;P&gt;- Select a Date value from a variable,&lt;/P&gt;&lt;P&gt;- Take a screenshot of the object after selection and save it as JPG file,&lt;/P&gt;&lt;P&gt;- Send a mail with the JPG in attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1- When executing the macro with Button action, I get the wanted result : an email with the attachment and a complete screenshot : &lt;/P&gt;&lt;P&gt;&lt;IMG alt="CompleteScreen.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85338_CompleteScreen.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;2- When executing the macro with the "OnOpen" trigger, the mail is sent with attachment but the screenshot is incomplete and doesn't contain the images and emoticons : &lt;/P&gt;&lt;P&gt;&lt;IMG alt="IncompleteScreen.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/85339_IncompleteScreen.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an idea to fix this issue ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Apr 2015 12:41:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-29T12:41:37Z</dc:date>
    <item>
      <title>Execute Macro after finishing document load</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850380#M1009410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a QlikView document which contains an object with images and emoticons.&lt;/P&gt;&lt;P&gt;I developed a vbscript Macro with 3 steps : &lt;/P&gt;&lt;P&gt;- Select a Date value from a variable,&lt;/P&gt;&lt;P&gt;- Take a screenshot of the object after selection and save it as JPG file,&lt;/P&gt;&lt;P&gt;- Send a mail with the JPG in attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1- When executing the macro with Button action, I get the wanted result : an email with the attachment and a complete screenshot : &lt;/P&gt;&lt;P&gt;&lt;IMG alt="CompleteScreen.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85338_CompleteScreen.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;2- When executing the macro with the "OnOpen" trigger, the mail is sent with attachment but the screenshot is incomplete and doesn't contain the images and emoticons : &lt;/P&gt;&lt;P&gt;&lt;IMG alt="IncompleteScreen.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/85339_IncompleteScreen.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an idea to fix this issue ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 12:41:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850380#M1009410</guid>
      <dc:creator />
      <dc:date>2015-04-29T12:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Execute Macro after finishing document load</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850381#M1009411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you tried to run the Macro on Post reload option?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 12:52:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850381#M1009411</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-29T12:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Execute Macro after finishing document load</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850382#M1009412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe the calculations aren't finished when the screenshot was made. Try to put these statement before the screenshot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ActiveDocument.GetApplication.WaitForidle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 13:14:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850382#M1009412</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-04-29T13:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Execute Macro after finishing document load</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850383#M1009413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even On Post Reload, that doesn't work !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 14:45:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850383#M1009413</guid>
      <dc:creator />
      <dc:date>2015-04-29T14:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Execute Macro after finishing document load</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850384#M1009414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Hi,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Thanks for your answer.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;That's the problem : the screenshot statement run before calculations.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Even &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ActiveDocument.GetApplication.WaitForidle or &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ActiveDocument.GetApplication.Sleep doesn't solve the problem.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 14:47:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850384#M1009414</guid>
      <dc:creator />
      <dc:date>2015-04-29T14:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Execute Macro after finishing document load</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850385#M1009415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sleep won't help because everything is sleeping but WaitForIdle should wait for finishing the calculations. Maybe it's not directly the calculation else the rendering from gui which is working yet or the wait-statement isn't on the right place. You could post the script maybe there is what to find.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes it helped to create a virtual overhead to delay the execution maybe some loop with a calculation or further selections within the app or to run a ping-statement. But I believe it will be rather an ugly trial &amp;amp; error game ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 15:08:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-Macro-after-finishing-document-load/m-p/850385#M1009415</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-04-29T15:08:10Z</dc:date>
    </item>
  </channel>
</rss>

