You could use the FILE SCRIPTING OBJECT if the code is being run on your machine, if you are doing it through a webpage then you will need to either change the content-type being sent for your data or use ActiveX.
This is a function I use to manage writing of whatever I need to text files.
'This function manages writing information to a text file.
'The remarked out Constants set by the const key should be placed in the Variables section
'of your script at the top so they can be used within your script. This function only handles Writing and Appending.
Function WriteFile(Filename,Text,WriteMethod)
'Define Contants for WriteFile Subroutine
'Const ForReading = 1, ForWriting = 2, ForAppending=8
Dim fs, f
Set fs = CreateObject("Scripting.FileSystemObject"
Set f = fs.OpenTextFile(FileName, WriteMethod, True)
f.WriteLine Text
F.Close
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.