Set fso = CreateObject("Scripting.FileSystemObject")' Create the file, and obtain a file object for the file.FileName = "c:\Users\you\Desktop\testfile.txt"fso.CreateTextFile FileNameSet fileObj = fso.GetFile(FileName)' Open a text stream for output.Set a = fileObj.OpenAsTextStream(iomode, TristateTrue)