6 Replies Latest reply: Mar 22, 2011 7:54 AM by JASON TROFIMCZUK RSS

    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?