send individual PDF's to a mail list in Excel
Barb Henderson Barb Henderson
35.6K subscribers
30,830 views
0

 Published On Mar 14, 2018

send individual PDF's to a mail list in Excel. Send unique PDF's to each email in a list in Excel.
Send unique PDF's to each email in a list in Excel. Send any type of attachment specified to a list of emails in an Excel file.



Sub Send_email_fromexcel()
Dim edress As String
Dim subj As String
Dim message As String
Dim filename As String
Dim outlookapp As Object
Dim outlookmailitem As Object
Dim myAttachments As Object
Dim path As String
Dim lastrow As Integer
Dim attachment As String
Dim x As Integer




x = 2

Do While Sheet1.Cells(x, 1) (the symbol for not equal to) ""

Set outlookapp = CreateObject("Outlook.Application")
Set outlookmailitem = outlookapp.createitem(0)
Set myAttachments = outlookmailitem.Attachments
path = "C:\Users\Barb\Documents\statements\"
edress = Sheet1.Cells(x, 1)

subj = Sheet1.Cells(x, 2)
filename = Sheet1.Cells(x, 3)
attachment = path + filename



outlookmailitem.To = edress
outlookmailitem.cc = ""
outlookmailitem.bcc = ""
outlookmailitem.Subject = subj
outlookmailitem.body = "Please find your statement attached" & vbCrLf & "Best Regards"


myAttachments.Add (attachment)
outlookmailitem.display
outlookmailitem.send

lastrow = lastrow + 1
edress = ""
x = x + 1

Loop


Set outlookapp = Nothing
Set outlookmailitem = Nothing

End Sub
For more help visit my website http://www.easyexcelanswers.com or email me at [email protected].

Contact me regarding customizing this template for your needs.

Excel one-on-one on-line training available. Email me to arrange.

I am able to provide online help on your computer at a reasonable rate.

I use a Blue condensor Microphone to record my videos, here is the link
https://amzn.to/37gyyGa

Check out Crowdcast for creating your webinars
https://app.linkmink.com/a/crowdcast/83

If you need to buy Office 2019 follow
https://amzn.to/2VX5dv8

I use Tube Buddy to help promote my videos
Check them out
https://www.Tubebuddy.com/easyexcelan...

Follow me on Facebook
  / easyexcel.answers  


Follow me on twitter
easyexcelanswers

IG @barbhendersonconsulting

You can help and generate a translation to you own language
http://www.youtube.com/timedtext_cs_p...

*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I've used or have experience with.

show more

Share/Embed