<?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: Close Qlikview software using VB Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837511#M1215005</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arnoqlik_0-1632127436546.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/62340i2DB4E761615F66A7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arnoqlik_0-1632127436546.png" alt="arnoqlik_0-1632127436546.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Forget it... I have to find another way to generate a screenshot of the application. My scheduler doesn't work well with the vbs script.&lt;BR /&gt;I'll try with PowerShell or I'll see if it's doable to generate a pdf file every 2 hours...&lt;/P&gt;</description>
    <pubDate>Mon, 20 Sep 2021 08:45:40 GMT</pubDate>
    <dc:creator>arnoqlik</dc:creator>
    <dc:date>2021-09-20T08:45:40Z</dc:date>
    <item>
      <title>Close Qlikview software using VB Script</title>
      <link>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1836919#M1214956</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Here is below the code I use to take a screenshot of an application. I managed to close the app but I don't find a way to close Qlikview.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;set Qv = CreateObject("QlikTech.QlikView")
Set QvDoc = Qv.OpenDoc ("D:\…\Application.qvw","","")

QvDoc.GetApplication.WaitForIdle
QvDoc.Sheets("Sheet Name").ExportBitmapToFile "D:\…\Screenshot.jpg"

QvDoc.CloseDoc()&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;QvDoc.GetApplication.Quit&lt;/STRONG&gt; closes the software but it generates a popup saying that Qlikview has stopped working.&lt;BR /&gt;Killing the process on the server seems too brutal for me.&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 09:52:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1836919#M1214956</guid>
      <dc:creator>arnoqlik</dc:creator>
      <dc:date>2021-09-17T09:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Close Qlikview software using VB Script</title>
      <link>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1836978#M1214960</link>
      <description>&lt;P&gt;Try it with:&amp;nbsp;&lt;STRONG&gt;Qv.&lt;/STRONG&gt;GetApplication.Quit&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 11:16:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1836978#M1214960</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-09-17T11:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Close Qlikview software using VB Script</title>
      <link>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1836983#M1214961</link>
      <description>&lt;P&gt;I get this error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arnoqlik_0-1631877936341.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/62169iC46C7D513CA25F40/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arnoqlik_0-1631877936341.png" alt="arnoqlik_0-1631877936341.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 11:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1836983#M1214961</guid>
      <dc:creator>arnoqlik</dc:creator>
      <dc:date>2021-09-17T11:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Close Qlikview software using VB Script</title>
      <link>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1836987#M1214963</link>
      <description>&lt;P&gt;Ok. then try it without closing the document:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;set Qv = CreateObject("QlikTech.QlikView")
Set QvDoc = Qv.OpenDoc ("D:\…\Application.qvw","","")

QvDoc.GetApplication.WaitForIdle
QvDoc.Sheets("Sheet Name").ExportBitmapToFile "D:\…\Screenshot.jpg"

QvDoc.GetApplication.Quit&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 11:57:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1836987#M1214963</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-09-17T11:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Close Qlikview software using VB Script</title>
      <link>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1836993#M1214964</link>
      <description>&lt;P&gt;Everything is closed but I also get this popup&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arnoqlik_0-1631880009755.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/62173i9838611B823108AF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arnoqlik_0-1631880009755.png" alt="arnoqlik_0-1631880009755.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 12:00:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1836993#M1214964</guid>
      <dc:creator>arnoqlik</dc:creator>
      <dc:date>2021-09-17T12:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Close Qlikview software using VB Script</title>
      <link>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837272#M1214992</link>
      <description>&lt;P&gt;That's a Windows message and means that QlikView isn't terminated yet else it's running and doesn't communicates properly with the OS. I'm not absolutely sure but if I look on the example from the APIGuide.qvw it seems that there is no document is initialized which is usually needed as basis for many statements. Therefore try it with such a statement, like:&lt;/P&gt;&lt;P&gt;set QvInst = CreateObject("QlikTech.QlikView")&lt;BR /&gt;Set QvApp = QvInst.OpenDoc ("D:\…\Application.qvw","","")&lt;BR /&gt;&lt;STRONG&gt;Set QvDoc = QvApp.ActiveDocument&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;QvDoc.GetApplication.WaitForIdle&lt;BR /&gt;QvDoc.Sheets("Sheet Name").ExportBitmapToFile "D:\…\Screenshot.jpg"&lt;/P&gt;&lt;P&gt;QvDoc.CloseDoc&lt;BR /&gt;QvDoc.GetApplication.Quit&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Sat, 18 Sep 2021 10:29:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837272#M1214992</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-09-18T10:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Close Qlikview software using VB Script</title>
      <link>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837451#M1215002</link>
      <description>&lt;P&gt;Thanks again for your help.&lt;/P&gt;&lt;P&gt;There's an error with this new statement.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arnoqlik_0-1632122045114.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/62305i246EE35885B146D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arnoqlik_0-1632122045114.png" alt="arnoqlik_0-1632122045114.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 07:14:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837451#M1215002</guid>
      <dc:creator>arnoqlik</dc:creator>
      <dc:date>2021-09-20T07:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Close Qlikview software using VB Script</title>
      <link>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837469#M1215004</link>
      <description>&lt;P&gt;Try it with a replace from:&lt;/P&gt;&lt;P&gt;Set QvDoc = QvApp.ActiveDocument&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;Set QvDoc&lt;STRONG&gt; = ActiveDocument&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 07:47:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837469#M1215004</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-09-20T07:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Close Qlikview software using VB Script</title>
      <link>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837511#M1215005</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arnoqlik_0-1632127436546.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/62340i2DB4E761615F66A7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arnoqlik_0-1632127436546.png" alt="arnoqlik_0-1632127436546.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Forget it... I have to find another way to generate a screenshot of the application. My scheduler doesn't work well with the vbs script.&lt;BR /&gt;I'll try with PowerShell or I'll see if it's doable to generate a pdf file every 2 hours...&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 08:45:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837511#M1215005</guid>
      <dc:creator>arnoqlik</dc:creator>
      <dc:date>2021-09-20T08:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Close Qlikview software using VB Script</title>
      <link>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837586#M1215020</link>
      <description>&lt;P&gt;To automate such a task is definitely not trivial and there are a lot of possibilities what might go wrong without returning helpful error-messages to find the real cause which often leads to ways to solve or at least to bypass the challenge. Here the way which we use:&lt;/P&gt;&lt;P&gt;- QMC - task within a task-chain with an EXECUTE statement&lt;BR /&gt;- EXECUTE triggers a Windows-task&lt;BR /&gt;- Windows-task starts with a command-line statement - with the parameter /l - &amp;nbsp;the QV desktop client with a&amp;nbsp;&lt;BR /&gt;&amp;nbsp; certain&amp;nbsp;control application&lt;BR /&gt;- control application performed a reload&lt;BR /&gt;- reload triggers a macro&lt;BR /&gt;- macro runs within loops through multiple UI tables containing paths + app + various other information&lt;BR /&gt;&amp;nbsp; and opened the appropriate apps and performed prints + exports + storing/mailing the stuff&lt;BR /&gt;- if everything is done - it called a close and quit statement&lt;/P&gt;&lt;P&gt;I don't know how your process look like but one bigger difference is that you calls an external vbs and we open a control app with the desktop client and using vbs on the inside from QV. IMO the approach using a control app which reads all relevant information in tables and performed within loops multiple actions is much more flexible as using single batch-files.&lt;/P&gt;&lt;P&gt;For us it worked fine and the above mentioned process is totally automated. But it requires to adjust multiple settings within the user + document settings as well as on the server, distribution engine and Windows (task-planner, local policies). Therefore it could become quite hard to get it to work within the mentioned way.&lt;/P&gt;&lt;P&gt;I'm not sure if another tool like PowerShell could make it easier. If your approach creates the expected output and isn't just closing afterwards you may consider to kill this process with another batch (whereby I assume it's rather a quite small syntax issue which prevents to quit QV properly). If max. one QV.exe is running it's not extremely complicated but if there are running multiple instances you would find a way to detect the right one …&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 12:58:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837586#M1215020</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-09-20T12:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Close Qlikview software using VB Script</title>
      <link>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837618#M1215023</link>
      <description>&lt;P&gt;I don't have enough knowledge to find a perfect process and there are limitations from my external scheduler (not QMC).&lt;/P&gt;&lt;P&gt;I finally found this solution:&lt;/P&gt;&lt;P&gt;1. Duplicate the application and insert these macros when the document is open (OnOpen trigger):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sub AutoReload
ActiveDocument.Reload
ActiveDocument.Save
End Sub

sub export
ActiveDocument.GetApplication.WaitforIdle
ActiveDocument.ActiveSheet.ExportBitmapToFile "D:\QLIKVIEW\…latest_screenshot.jpg"
ActiveDocument.GetApplication.Sleep 1000
ActiveDocument.GetApplication.Quit
End sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Create a small cmd to open the application:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;start "" "D:\QLIKVIEW\…\Application.qvw"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The application and the Qlikview client are properly closed.&lt;BR /&gt;This duplicate application is of course reloaded before this process.&lt;/P&gt;&lt;P&gt;Thank you again for your time.&lt;BR /&gt;&lt;BR /&gt;Note: well I hope it's the final solution for my needs &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 09:55:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Close-Qlikview-software-using-VB-Script/m-p/1837618#M1215023</guid>
      <dc:creator>arnoqlik</dc:creator>
      <dc:date>2021-09-21T09:55:51Z</dc:date>
    </item>
  </channel>
</rss>

