1.打开文件,成添加状态
2.写入文件
3.关闭文件
filestring = App.Path & "\a.txt"
Dim ofs As FileSystemObject
Set ofs = New FileSystemObject
Dim txtStream As TextStream
Set txtStream = ofs.OpenTextFile(filestring, ForAppending)
txtstream.WriteLine(写入的内容) '这个函数写入后自动换行
txtstream.Write(写入的内容) ‘这个函数不自动换行
txtStream.Close
Set ofs = Nothing