Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)
MyDoc.SaveAs("c:\test_nodata\test.qvw")
MyDoc.CloseDoc
MyApp.Quit
Regards!
Stefan
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.
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