Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The following script gives an error (ActiveX component can't create object: Scripting.FileSystemObject) when the macro is ran on the server (v 9.0 via IE plugin). When I run it locally it gives no errors:
set StartTime= ActiveDocument.Variables("StartTime")
set EndTime= ActiveDocument.Variables("EndTime")
set fso= CreateObject("Scripting.FileSystemObject")
directory = "c:"
set f=fso.CreateTextFile(directory & "analysis.csv")
set f = fso.GetFile(directory & "analysis.csv")
set txsStream = f.OpenAsTextStream(2) 'For writing
txsStream.Write(StartTime.getcontent.string + " - " + EndTime.getcontent.string) 'Write starttime and endtime in file
txsStream.WriteBlankLines 1
txsStream.Close
The security levels in the module editor are set to system access.
Any ideas?
In your Edit Module window (Macro editor window)
under Requested Module Security choose system access
and in the current local security choose allow system access
Sorry, but maybe I didn't write that clear. These levels are already set to system access.
If your running that in the server and in an IE plugin that will not work because maybe its one of qvs restriction.
i used your code in QV 10, Webview turned on and the script didn't work..
maybe this blog can give you an idea on how to solve your issue:
hi,
Also check on Management Console, there is an option of Run Macro on Server.
YOu will find it in the fourth Tab -- > Security -->> ( I m not sure about the exact path but there is an option of run macro on Server.).
I hope this solves your problem.
Hi,
Im having exactly the same issue and have started a new forum thread. Any input would be great.
http://community.qlik.com/forums/t/42978.aspx
Regards
Jason