Hi all,
I have a list of records in a Excel that I would like to send by email each of them to the appropriate customer (defined by a field in each record).
There is one record per line and some lines relate to the same customer so I would like to compile and send in the same email.
At the moment I lookin at this function to send the emails.
Sub email()
Dim OutApp As Object
Dim OutMail As Object
Dim EmailAddr As String
Dim Subj As String
Dim BodyText As String
EmailAddr = "[email protected]"
Subj = "Your subject"
BodyText = "your body "
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.to = EmailAddr
.CC = ""
.BCC = ""
.Subject = Subj
.Body = BodyText
.send
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Ideally I would like to include the information on the table as part of the body of the email rather as an attachement.
Any suggestion?
Thanks for reading.
Bookmarks