开发者

Text Documents Outlook 2007

I was wondering if there is any way to read informations out from a text file wi开发者_开发知识库th VBA in Outlook 2007.

Thanks for attention


  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

From MSDN FSO Object

Way more comfortable then Open sPath, #FileNo. You need to add FSO to your project with "Tools -> References", like it's described in the MSDN.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜