'-----------写入文本文件
Dim fso As Object
Dim filePath As String
Dim content As String
' 定义文件路径filePath = "C:\file.txt"' 定义要写入的内容content = HTTPReq.responseText' 创建FileSystemObject对象fso = CreateObject("Scripting.FileSystemObject")' 使用OpenTextFile方法打开文件进行写入With fso.CreateTextFile(filePath, True) ' True 表示覆盖已存在的文件.WriteLine(content).Close()End WithMsgBox("文件已保存至:" & filePath)'-----------写入文本文件结束
IIT2024-12-31
