Qlik Community

QlikView Integration

Discussion Board for collaboration on QlikView Integration.

New Contributor III

QlikView vbs open doc in new window

Hi all,

I'm writing a small vbs script that opens a qvw without data and saves it in different location. After the save is complete the document is closed. The problem is that if the main doc is already open QV closes it at the end. Is there a way the vbs script to open new QV instance instead using the already open one?

My "script.vbs" looks like this:

Set MyApp = CreateObject("QlikTech.QlikView")

set MyDoc = MyApp.OpenDocEx ( "c:\test\test.qvw", 2 , false , "" , "", "" , true)






Tags (2)
2 Replies

Re: QlikView vbs open doc in new window

I don't think so, but you could leave out the MyApp.Quit line. If your script finishes then all object references should be cleaned up anyway automatically.

talk is cheap, supply exceeds demand

Re: QlikView vbs open doc in new window

To do this you would need to start a new instance of qlikview - maybe in this way:

rem ** Example 1 ** from APIGuide.qvw

set app= ActiveDocument.GetApplication

app.Launch "C:\Program Files\Qv.exe","C:\Myfiles\abc.qvw"

and your code might be executed by an OnOpen-trigger or you execute external batches - triggerred per vbs or a load-statement:

QlikView Maven: QlikView Command Line and Automation

Re: create external task on QMC (VB)

- Marcus