Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ActiveX component can't create object

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?

6 Replies
Not applicable
Author

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

Not applicable
Author

Sorry, but maybe I didn't write that clear. These levels are already set to system access.

Not applicable
Author

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..

Not applicable
Author

deepakk
Partner - Specialist III
Partner - Specialist III

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.

Not applicable
Author

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