You need to fill the below given template to send the multiple email.
In column “A”, fill “To” email Id.
In column “B”, fill the “CC” email id. You can keep it blank, if you don’t want keep anybody in CC.
In the column “C”, put the subject of email.
In the column “D”, put the mail body content.
Column “E” for attachments, Provide the complete path and file name with file extension. You can keep it blank, if you don’t want to attach file.
Column “F” is for status. This is an auto fill column. You don’t need to fill it. Once automation will sent the email it will filled automatically.
Below is VBA code which we have assigned on “Click to send mails” button.
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Send_Mails")
Dim i As Integer
Dim OA As Object
Dim msg As Object
Set OA = CreateObject("outlook.application")
Dim last_row As Integer
last_row = Application.CountA(sh.Range("A:A"))
For i = 2 To last_row
Set msg = OA.createitem(0)
msg.to = sh.Range("A" & i).Value
msg.cc = sh.Range("B" & i).Value
msg.Subject = sh.Range("C" & i).Value
msg.body = sh.Range("D" & i).Value
If sh.Range("E" & i).Value <> "" Then
msg.attachments.Add sh.Range("E" & i).Value
sh.Range("F" & i).Value = "Sent"
MsgBox "All the mails have been sent successfully"
My Name is PK. I am founder of PK-AnExcelExpert.com. I am a Microsoft Certified Professional. I have more than 10 years of experience in Data Visualization, Excel Automation and dashboard creation. Excel is my passion and I like to do always something innovative in Excel and share it with other people.
In this article you will learn how to convert multiple Excel files into PDF file using VBA. This is quite
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.