Forum Discussion
ASV
14 years agoContributor
Hello Randy
I think to save notepad in this way is not good.
I suggest this
Set FSO = Sys.OleObject("Scripting.FileSystemObject")
Set File = FSO.OpenTextFile("C:\TempFile.txt", 2, True, 0) ' Open for writing
To open for reading
write in this way
Set File = FSO.OpenTextFile("C:\TempFile.txt", 1, True, 0)
File.readall
I think to save notepad in this way is not good.
I suggest this
Set FSO = Sys.OleObject("Scripting.FileSystemObject")
Set File = FSO.OpenTextFile("C:\TempFile.txt", 2, True, 0) ' Open for writing
To open for reading
write in this way
Set File = FSO.OpenTextFile("C:\TempFile.txt", 1, True, 0)
File.readall