Hi,
I am hoping to use the coding below to send an email with 4 attachments, the problem is the atachments have different times and dates on so i have to use the variables to create the attahment.
How can i get this into this coding.
the attachment code is like this
Hope this is of use, Rob.
I am hoping to use the coding below to send an email with 4 attachments, the problem is the atachments have different times and dates on so i have to use the variables to create the attahment.
How can i get this into this coding.
Code:
Dim blnSuccessful As Boolean
Dim strHTML As String
strHTML = "Hi," & vbCrLf & vbCrLf _
& "Please find attached the latest update, this report has been automatically generated." & vbCrLf & vbCrLf _
& "If you have any queries, would you please let me know." & vbCrLf & vbCrLf _
& "Regards" & vbCrLf
blnSuccessful = FnSafeSendEmail("test@test.com", _
"Update for " & Format(Range("d4").Value, "hh.mm.ss") & ".", _
strHTML, _
"C:\MyAttachmentFile1.txt; C:\MyAttachmentFile2.txt", _
"cc_recipient@domain.com", _
"bcc_recipient@domain.com")
If blnSuccessful Then
MsgBox "E-mail message sent successfully!"
Else
MsgBox "Failed to send e-mail!"
End If
the attachment code is like this
Code:
pname = "U:\private\Interval Report\Site Return " & Format(rrdate, "yyyy-mm-dd hh-mm") & ".xls"
Hope this is of use, Rob.