【書式】
TextStream.ReadAll
テキストファイル内の全ての文字を読み込みます。
Sub test78()
Dim FSO As Object, buf As String
Set FSO = CreateObject("Scripting.FileSystemObject")
''C:\Work\Sample.txtの全ての文字を読み込んで表示します
With FSO.GetFile("C:\Work\Sample.txt").OpenAsTextStream
buf = .ReadAll
MsgBox buf
.Close
End With
Set FSO = Nothing
End Sub