3
A
回答
6
Private Sub Command1_Click()
'Declare variables.
Dim fso As New FileSystemObject
Dim ts As TextStream
'Open file.
Set ts = fso.OpenTextFile(Environ("windir") & "\system.ini")
'Loop while not at the end of the file.
Do While Not ts.AtEndOfStream
Debug.Print ts.ReadLine
Loop
'Close the file.
ts.Close
End Sub
路更舒服然后Open sPath, #FileNo
。您需要使用“工具 - >参考”向您的项目添加FSO,就像在MSDN中描述的那样。
相关问题
- 1. Outlook 2007超链接和文本缩进
- 2. Outlook 2007多选文件夹
- 3. 使用VBA在Outlook 2007中以编程方式打印文档
- 4. 保存Excel 2007文档
- 5. Sharepoint 2007文档管理
- 6. 当前在Outlook 2007中选择的文本
- 7. MS Outlook 2007〜VBA将规则应用于附件中的文本
- 8. Outlook interop PrintOut文档名称
- 9. SharePoint 2007文档库与文件夹
- 10. 以编程方式访问Word 2007文档的文档属性
- 11. Outlook 2007 - 如何将RTF文本插入AppointmentItem
- 12. 文本选定/右键单击事件(Outlook 2007 VBA)
- 13. Outlook - 将纯文本转换为HTML - 在2007年不起作用
- 14. C#在MS Outlook 2007中获取电子邮件正文中的选定文本
- 15. Excel 2007中:从Outlook 2007
- 16. IFilters 2.0全文索引Office 2007文档中的图表中的文本?
- 17. Outlook 2007 + Asp.net C#
- 18. Outlook 2007 - 约会
- 19. Delphi Outlook 2007/2010
- 20. Visual Studio 2010中的Word 2007文档
- 21. sharepoint 2007文档库的限制
- 22. Word 2007中的拆分文档
- 23. 在WSS3.0/SharePoint 2007的文档类型
- 24. 如何在Outlook 2010,Outlook 2007,Outlook 2013中的图像顶部的文本上提供填充/边距?
- 25. 向Outlook 2007中添加按钮以从HTML文件添加文本
- 26. SharePoint 2007 Word文档转换非常慢
- 27. 加密和解密Office 2007文档
- 28. SharePoint 2007文档模板损坏
- 29. 使用vba循环整个2007文档
- 30. 使用PHPExcel编辑Excel 2007文档
非常感谢:) – VanDeath
@VanDeath欢迎来到Stackoverflow!看看[常见问题](http://stackoverflow.com/faq),你可以通过点击向上箭头来获得有用的答案,甚至接受它。 – Jacob
我不能XD它告诉我我必须有15个声望-.-' – VanDeath