• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA to send out mass email

Hi,

Can someone help me with VBA code to send out mass emails. I have a excel in which I have I have Name in column A and email id in column B.
I need a macro that sends separate email using outlook for each name to its corresponding email id.

The body of all these emails is fixed.

Also, I need to attach a standard pdf file saved on my desktop, say be name shakti.pdf.

Any help will be highly appreciated.

Thanks,

Shakti
 
Last edited:
Code:
Option Explicit

Sub Send_Email()

    Dim c As Range
    Dim OutLookApp As Object
    Dim OutLookMailItem As Object
    Dim i As Integer
   
    For Each c In Range("B2:B" & Cells(Rows.Count, "B").End(xlUp).Row).Cells
        Set OutLookApp = CreateObject("Outlook.application")
        Set OutLookMailItem = OutLookApp.CreateItem(0)
        With OutLookMailItem
                .To = c.Value
                .CC = ""
                .BCC = ""
                .Subject = "Your Subject here"
                .HTMLBody = "Your Body content here"
                .Attachments.Add "C:\Users\My\Desktop\MyAttachment.pdf"
                .Display
                '.Send
        End With
    Next c

End Sub
 

Attachments

  • WORKS Bulk Email w Same Attachment.xlsm
    16.9 KB · Views: 16
Back
Top