有2种方法,一种是调用fso的流操作,另一种比较简单dim filename as string filename="d:\test.text" open filename for output as #1 print #1,"这里写入文件内容" close #1