ник: Lukas
Примитивно, но вроде работает:
Public Function GetBodyTxtFile(FileFullPath As String) As String
Dim str As String
Dim FileNum As Long
If Len(Dir(GetBodyTxtFile)) > 0 Then
FileNum = FreeFile()
Open FileFullPath For Input As #FileNum
Do Until EOF(FileNum)
Line Input #FileNum, str
GetBodyTxtFile = GetBodyTxtFile & vbCrLf & str
Loop
Close #FileNum
Else
GetBodyTxtFile = "Error: file not found."
End If
End Function
'?GetBodyTxtFile("C:\40.html")
|