' Create Text file called Temp.txt
Dim fso
Dim ObjStream
Const TristateFalse = 0
Const FILE_LOCATION = "C:\"
Const FILE_NAME = "Temp.txt"
set Fso = CreateObject("Scripting.FilesystemObject")
set objStream = FSO.CreateTextFile(FILE_LOCATION & FILE_NAME, True, TristateFalse)
With ObjStream
.WriteLine "Test Line 1..."
.WriteLine "Test Line 2..."
.Write "The .Write command Writes with no carriage return at end of line."
.WriteBlankLines (2)
.WriteLine "Test Line 3..."
.Close
End With
MsgBox "File " & FILE_NAME & " was Created Successfully."