Hi all,
I've been using Access to send emails for quite a while now, using either sendObject or shell instructions sent to Thunderbird (when i needed attachments).
The body of my messages where imported from a txt file using the following code :
This works fine with plain text files, but it fails to read a html file. I get the following error : "input past end of file".
Any hint?
Cheers!
I've been using Access to send emails for quite a while now, using either sendObject or shell instructions sent to Thunderbird (when i needed attachments).
The body of my messages where imported from a txt file using the following code :
Code:
Public Function strLecture(ByVal cheminFile As String) As String
' To read a text file
On Error GoTo E_Handle
Dim nbeCar As Long
Dim LecFile As Integer
LecFile = FreeFile
Open cheminFile For Input As LecFile
nbeCar = LOF(LecFile)
strLecture = Input(nbeCar, LecFile)
sExit:
On Error Resume Next
Reset
Exit Function
E_Handle:
MsgBox Err.Description, vbOKOnly + vbCritical, "Error: " & Err.Number
Resume sExit
End Function
Any hint?
Cheers!