1 Reply Latest reply: Nov 10, 2009 8:40 AM by csavgssc RSS

    Error: ActiveX component can't create object: 'Scripting.FileSystemObject'

    pcjyeh

      Hi,

      I got this VBScript problem in the macro of writing a file. It stoped at the first line: Set oFS = CreateObject("Scripting.FileSystemObject")

      The tricky thing is it ran successfully yesterday to create a text file. :-(

      ********************************************************

      Set oFS = CreateObject("Scripting.FileSystemObject")
      Const strXmlFile = "Documents.xml"
      Const myInfo = "XML_Variables.txt"
      Set objXMLFile = oFS.OpenTextFile(strXmlFile, 2, True, 0)
      objXMLFile.WriteLine "This is a text file."

       

      Many thanks.

      Peter