<?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: OnOpen Macro not running through QEMC in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527363#M693763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OnOpen macro will not trigger in Publisher.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want your files to be copied during loading it is better to call the macro from the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alexander has a point also. Never use mapped drive, use UNC path instead. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jul 2013 08:12:35 GMT</pubDate>
    <dc:creator>jerrysvensson</dc:creator>
    <dc:date>2013-07-02T08:12:35Z</dc:date>
    <item>
      <title>OnOpen Macro not running through QEMC</title>
      <link>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527360#M693760</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 hope someone can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a qlikview document with an onopen macro.&amp;nbsp; This macro simply moves some files from one location to another and then closes the document.&amp;nbsp; This works fine when I manually open the document.&amp;nbsp; When I schedule it to run (or click on run) from the Qlikview Enterprise Management Console, the macro doesn't seem to run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest why this may be and what I can do to correct it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the part of the macro that moves the files:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Sub Movefiles()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dim OldPath, OldPath1, NewPath, Fileprefix, Fileprefix1, FileSysObj&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;On Error Resume Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;OldPath = "Z:\QlikView_SourceDocs_V10\Additional Data Sources\Text"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;OldPath1 = "Z:\QlikView_SourceDocs_V10\Additional Data Sources\Text"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;NewPath = "Z:\QlikView_SourceDocs_V10\Additional Data Sources\Text\HIST"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Fileprefix = "TDH_AR_HIST_*"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Fileprefix1 = "TDH_TM_201*"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;If Right(OldPath, 1) &amp;lt;&amp;gt; "\" Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;OldPath = OldPath &amp;amp; "\" &amp;amp; Fileprefix&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;If Right(OldPath1, 1) &amp;lt;&amp;gt; "\" Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;OldPath1 = OldPath1 &amp;amp; "\" &amp;amp; Fileprefix1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Set FileSysObj = CreateObject("Scripting.FileSystemObject")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FileSysObj.MoveFile OldPath, Newpath&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FileSysObj.MoveFile OldPath1, Newpath&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;End Sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;Justine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2013 14:19:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527360#M693760</guid>
      <dc:creator />
      <dc:date>2013-07-01T14:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: OnOpen Macro not running through QEMC</title>
      <link>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527361#M693761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Justine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When QEMC/Publisher executes a macro it does so as the user that is running the Publisher service.&lt;/P&gt;&lt;P&gt;Make sure that the user has access to the folder where you are accessing files and also that the Z: drive is a valid path for that user. Most likely if you have never logged on with that user the mapping won't exists so you might want to go with the full folder name instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you are reloading the document locally you are executing the macro as your user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also make sure that the macro has full system access and that the server is allowed to execute macros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2013 15:09:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527361#M693761</guid>
      <dc:creator>Alexander_Thor</dc:creator>
      <dc:date>2013-07-01T15:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: OnOpen Macro not running through QEMC</title>
      <link>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527362#M693762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the speedy response Alexander.&lt;/P&gt;&lt;P&gt;I shall check what you have suggested and post back here tomorrow.&lt;/P&gt;&lt;P&gt;Justine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2013 16:05:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527362#M693762</guid>
      <dc:creator />
      <dc:date>2013-07-01T16:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: OnOpen Macro not running through QEMC</title>
      <link>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527363#M693763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OnOpen macro will not trigger in Publisher.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want your files to be copied during loading it is better to call the macro from the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alexander has a point also. Never use mapped drive, use UNC path instead. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 08:12:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527363#M693763</guid>
      <dc:creator>jerrysvensson</dc:creator>
      <dc:date>2013-07-02T08:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: OnOpen Macro not running through QEMC</title>
      <link>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527364#M693764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;From de QV Load Script you can type an EXECUTE sentence to execute a DOS command through a .cmd or a .bat files.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 20:09:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527364#M693764</guid>
      <dc:creator>arieidel</dc:creator>
      <dc:date>2013-12-10T20:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: OnOpen Macro not running through QEMC</title>
      <link>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527365#M693765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all helpful answers. &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, 11 Dec 2013 10:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OnOpen-Macro-not-running-through-QEMC/m-p/527365#M693765</guid>
      <dc:creator />
      <dc:date>2013-12-11T10:20:43Z</dc:date>
    </item>
  </channel>
</rss>

