Hello All,
I am trying to add attachment from path referenced in column I, but not working. Can anyone help me on this?
Thank you a million.
Code
Sub ExcelToOutlookSR()
Dim mApp As Object
Dim mMail As Object
Dim SendToMail As String
Dim MailSubject As String
Dim mMailBody As String
For Each r In Selection
SendToMail = Range("B" & r.Row)
SendCCMail = Range("D" & r.Row)
MailSubject = Range("E" & r.Row)
mMailBody = Range("H" & r.Row)
mAttachment = Range("I" & r.Row)
Set mApp = CreateObject("Outlook.Application")
Set mMail = mApp.CreateItem(0)
With mMail
.To = SendToMail
.CC = SendCCMail
.Subject = MailSubject
.Body = mMailBody
.Attachments.Add = mAttachment
.Display
End With
Next r
End Sub
Display More