I have written a code to send bulk email to all recipients through a list from excel. however, it does not attach the attachment and also it does not send the document. in case we bypass the attachment, it only creates the email but does not send the email.
Sub Sendemail()
Dim olApp As Outlook.Application
Dim olMail As Outlook.MailItem
Dim myAttachment As Outlook.Attachment
Dim lastrow As Long
lastrow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To lastrow
Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)
With olMail
.To = Cells(i, 1).Value
.Subject = Cells(i, 2).Value
.Body = Cells(i, 3).Text
.Attachments.Add Cells(i, 4)
.Display
.Send
End With
Set olMail = Nothing
Set olApp = Nothing
Next i
End Sub
the above code should send the emails directly to the recipients.