Van*_*ath 3 outlook vba text-files outlook-vba
我想知道是否有任何方法可以从Outlook 2007中的VBA文本文件中读取信息.
谢谢你的关注
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
Run Code Online (Sandbox Code Playgroud)
然后方式更舒服Open sPath, #FileNo.您需要使用"工具 - >引用"将FSO添加到项目中,就像在MSDN中描述的那样.
| 归档时间: |
|
| 查看次数: |
535 次 |
| 最近记录: |