<?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: Execute macro from script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Execute-macro-from-script/m-p/992852#M649266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, thank you. I think that I need&amp;nbsp; try another way. I want to load data from ERP to one qlik app, and in the another app open it and join tables from Excel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Sep 2015 09:08:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-08T09:08:38Z</dc:date>
    <item>
      <title>Execute macro from script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-macro-from-script/m-p/992849#M649263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. I want to load data from 1C (Russian ERP). So, I use this macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;sub v82query&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Dim ServerName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Dim InfoBaseName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Dim InfoBasesAdminName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Dim InfoBasesAdminPass&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;ServerName = ""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;InfoBaseName = "&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;InfoBasesAdminName = "&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;InfoBasesAdminPass = ""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;set conn = CreateObject("V83.COMConnector.1")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Set v82 = conn.Connect("Srvr=""" + ServerName + """;Ref=""" + InfoBaseName + """;Usr=""" + InfoBasesAdminName + """;Pwd=""" + InfoBasesAdminPass + """;")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;query_1c = "ВЫБРАТЬ" &amp;amp;_&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;" Представление(цТребованиеНакладнаяДляСХМатериалы.Поле) Как&amp;nbsp; Pole"&amp;amp; vbNewLine &amp;amp; _&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;"ИЗ"&amp;amp; vbNewLine &amp;amp; _&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;" Документ.цТребованиеНакладнаяДляСХ.Материалы КАК цТребованиеНакладнаяДляСХМатериалы " &amp;amp; vbNewLine &amp;amp; _&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;set v8query = v82.NewObject("Query")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;v8query.text = query_1c&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;set result = v8query.Execute&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;set m = result.Choose&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;do while m.next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;set sql_string = ActiveDocument.DynamicUpdateCommand("INSERT INTO * "&amp;amp; vbNewLine &amp;amp; _&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;"(Pole) " &amp;amp; vbNewLine &amp;amp; _&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;"VALUES (" &amp;amp; m.Pole &amp;amp;")")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;loop&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;ActiveDocument.GetApplication.Refresh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I use a simple script:&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pole&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; C as Pole&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I want to call my macro from script, because I try to dynamic update Table1 and left join Table2.&lt;/P&gt;&lt;P&gt;Please, help me, how to call my macro from my script before left join?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 08:25:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-macro-from-script/m-p/992849#M649263</guid>
      <dc:creator />
      <dc:date>2015-09-08T08:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Execute macros from script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-macro-from-script/m-p/992850#M649264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, that will not work. You cannot call macro subs from the load script. You can use macro functions in a load statement (with some limitations), but I don't think that will help in this case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 08:28:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-macro-from-script/m-p/992850#M649264</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-09-08T08:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Execute macros from script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-macro-from-script/m-p/992851#M649265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It may be possible to put your macro into a .vbs statementfile, and execute the macro using cscript.exe in a batch file. You will need to drop the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.6667px;"&gt;ActiveDocument.GetApplication.Refresh &lt;SPAN style="font-size: 13.3333px;"&gt;statement and reload the document from the same batch file using the qv.exe /R option.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 08:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-macro-from-script/m-p/992851#M649265</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-09-08T08:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Execute macro from script</title>
      <link>https://community.qlik.com/t5/QlikView/Execute-macro-from-script/m-p/992852#M649266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, thank you. I think that I need&amp;nbsp; try another way. I want to load data from ERP to one qlik app, and in the another app open it and join tables from Excel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2015 09:08:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Execute-macro-from-script/m-p/992852#M649266</guid>
      <dc:creator />
      <dc:date>2015-09-08T09:08:38Z</dc:date>
    </item>
  </channel>
</rss>

