<?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: Trouble with Macros in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601904#M222572</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, created a DOS batch file which runs and updates the data, but does not create the jpg files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I need a trigger in the file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Feb 2014 11:24:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-02-19T11:24:03Z</dc:date>
    <item>
      <title>Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601896#M222564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to create a macro to export a chart as a JPG file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From within the Edit Script (Ctrl-E) I have added a new tab and entered the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION ExportObjectToJpg( ObjID, fName)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ActiveDocument.GetSheetObject(ObjID).ExportBitmapToFile fName&lt;/P&gt;&lt;P&gt;END FUNCTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB CallExample&lt;/P&gt;&lt;P&gt;&amp;nbsp; ExportObjectToJpg "CH01", "C:\CH01Image.jpg" &lt;/P&gt;&lt;P&gt;END SUB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following error is displayed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unknown statement&lt;/P&gt;&lt;P&gt;FUNCTION ExportObjectToJpg( ObjID, fName)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ActiveDocument.GetSheetObject(ObjID).ExportBitmapToFile fName&lt;/P&gt;&lt;P&gt;END FUNCTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB CallExample&lt;/P&gt;&lt;P&gt;&amp;nbsp; ExportObjectToJpg "CH01", "C:\CH01Image.jpg" &lt;/P&gt;&lt;P&gt;END SUB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I obtained the script from here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://luciancotea.wordpress.com/2013/07/18/qlikview-macros-useful-collection/" title="http://luciancotea.wordpress.com/2013/07/18/qlikview-macros-useful-collection/"&gt;QlikView Macros – Useful collection | Lucian Cotea&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also tried &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION RunExe(cmd)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CreateObject("WScript.Shell").Exec(cmd)&lt;/P&gt;&lt;P&gt;END FUNCTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB CallExample&lt;/P&gt;&lt;P&gt;&amp;nbsp; RunExe("c:\Program Files\Internet Explorer\iexplore.exe")&lt;/P&gt;&lt;P&gt;END SUB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which again fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm at a loss, any help greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 15:37:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601896#M222564</guid>
      <dc:creator />
      <dc:date>2014-02-18T15:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601897#M222565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That code from Lucian works fine for me. Do you actually have a chart object with Id &lt;EM&gt;CH01&lt;/EM&gt;? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 20:25:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601897#M222565</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-02-18T20:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601898#M222566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I Do, but as mentioned even the launch IE script won't work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i Must be missing something obvious.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 20:42:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601898#M222566</guid>
      <dc:creator />
      <dc:date>2014-02-18T20:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601899#M222567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, it works fine for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you have this root path? &lt;/P&gt;&lt;P&gt;do you have permission to write in c:?&lt;/P&gt;&lt;P&gt;do you have select in combo box in macro ALLOW SYSTEM ACCES?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something in your configuration is the problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 02:06:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601899#M222567</guid>
      <dc:creator>fkeuroglian</dc:creator>
      <dc:date>2014-02-19T02:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601900#M222568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where do I find&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"select in combo box in macro ALLOW SYSTEM ACCESS?"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 08:06:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601900#M222568</guid>
      <dc:creator />
      <dc:date>2014-02-19T08:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601901#M222569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;just to make sure. You wrote Ctrl-E, that opens the script editor.&lt;/P&gt;&lt;P&gt;This code should go in macro editor Ctrl-M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 08:14:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601901#M222569</guid>
      <dc:creator>jerrysvensson</dc:creator>
      <dc:date>2014-02-19T08:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601902#M222570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry, you found the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro now works, as you pointed out I had it in the script editor as I pointed in in my first post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I call the macro to run when refreshing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 08:21:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601902#M222570</guid>
      <dc:creator />
      <dc:date>2014-02-19T08:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601903#M222571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can trigger your&amp;nbsp; macro on PostReload.&lt;/P&gt;&lt;P&gt;But you have to do a batch reload using qv.exe /r app.qvw, since triggers will not trigger if you run a standard Publisher task.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 09:33:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601903#M222571</guid>
      <dc:creator>jerrysvensson</dc:creator>
      <dc:date>2014-02-19T09:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601904#M222572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, created a DOS batch file which runs and updates the data, but does not create the jpg files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I need a trigger in the file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 11:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601904#M222572</guid>
      <dc:creator />
      <dc:date>2014-02-19T11:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601905#M222573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, try this document and tell me how was&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 11:27:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601905#M222573</guid>
      <dc:creator>fkeuroglian</dc:creator>
      <dc:date>2014-02-19T11:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601906#M222574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="onpostreload.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/53471_onpostreload.jpg" style="width: 620px; height: 536px;" /&gt;Yes you need to add a trigger to the event OnPostReload&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 11:48:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601906#M222574</guid>
      <dc:creator>jerrysvensson</dc:creator>
      <dc:date>2014-02-19T11:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601907#M222575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fernando, Think you posted just after me. Macro now working, but need it to run automatically after an update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to use the "on postreload" option I believe, so just need to work out how.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 12:27:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601907#M222575</guid>
      <dc:creator />
      <dc:date>2014-02-19T12:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601908#M222576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add an Action.&lt;/P&gt;&lt;P&gt;Action Type . External&lt;/P&gt;&lt;P&gt;Action : Run macro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 12:29:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601908#M222576</guid>
      <dc:creator>jerrysvensson</dc:creator>
      <dc:date>2014-02-19T12:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Macros</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601909#M222577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it working finally. Wasn't sure what macro name to use. Second name worked so all is good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 17:32:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-Macros/m-p/601909#M222577</guid>
      <dc:creator />
      <dc:date>2014-02-19T17:32:01Z</dc:date>
    </item>
  </channel>
</rss>

