Hi Team,
Need some help!
I have 3 different emails, 3 different attachments, 3 different recipients and 3 different subjects and 3 different mail body contents
when i run macro every thing working fine but the script unable to picks attachements.
Please help!
Please find the attached.
Thanks in advance!
Rajesh
Sub Sendmail()
Dim OutlookApp As Object
Dim OutlookMail As Object
Dim RngList As Range
Dim Cell As Range
Dim LastRow As Long
With Sheets("Sheet1")
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Set RngList = Range("A2:A" & LastRow)
For Each Cell In RngList
If Cell.Value <> vbNullString Then
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
With OutlookMail
.To = Cell.Value
.CC = Cell.Offset(, 1).Value
.BCC = ""
.Subject = Cell.Offset(, 3).Value
.Body = Cell.Offset(, 4).Value
.Attachments.Add (Cell.Offset(, 5).Value)
.Display
End With
Set OutlookMail = Nothing
Set OutlookApp = Nothing
Else
End If
Next Cell
End With
End Sub
Bookmarks