'Append to an existing text file
On Error Resume Next
dim objFSO
dim objFile
Const ForAppending=8
'specify filename and path for file to open
strFile="c:\file.txt"
set objFSO=CreateObject("Scripting.FileSystemObject")
set objFile=objFSO.OpenTextFile(strFile,ForAppending)
objFile.WriteLine Now & " this is an appended line"
objFile.Close
set objFile=Nothing
set objFSO=Nothing
On Error Resume Next
dim objFSO
dim objFile
Const ForAppending=8
'specify filename and path for file to open
strFile="c:\file.txt"
set objFSO=CreateObject("Scripting.FileSystemObject")
set objFile=objFSO.OpenTextFile(strFile,ForAppending)
objFile.WriteLine Now & " this is an appended line"
objFile.Close
set objFile=Nothing
set objFSO=Nothing
No comments:
Post a Comment