Download : Excel Macro Application to Send Multiple Emails

.

Hello Friends,
I was getting queries on :
How to send Email from Excel ?
How to send Email from Gmail in Excel Macro ?
How to Send Email from Yahoo in Excel Macro ?
How to send email from Outlook in Excel Macro ?
How to send Multiple emails using Excel Macro ?

Keeping those queries in my mind, I have created one Excel Macro with proper UI (User Interface) to send multiple emails from GMAIL, YAHOO, REDIFFMAIL, NETSCAPE, HOTMAIL, AOL etc. It also has option to send multiple emails via Outlook. The User Interface of this tool looks like this:

Send Multiple Email

Send Multiple Email

Edited on: 21-Aug-2012
 
There is one Error which many of us faced while using this tool:
 

Run-time error -2147220973 (80040213). The transport failed to connect to the server.


 
One of our frequent blog reader Mr. Charles Azrak found the solution by changing the port number to 587 in the code for Gmail. That worked for him. Thanks Charles. See his comment
 
If you are also facing the same issue then try using port number as 587 for Gmail.

To know more about How to send email using Excel Macro from GMAIL, Yahoo, Outlook etc, Read this Article

The above tool has following features:

1. Using this Tool you can send unlimited number of individual emails: What is Individual Mail? If you want to send an email to 1000 different email ID, ONE by ONE, means you are not keeping all the 1000 IDs in TO list and sending one single mail, is called individual mail. In such case it becomes very difficult to send same email 1000 times. This tool will help you doing this just by a single Click.

2. You can input CC and BCC IDs as well : Wherever you want any email ID in CC or BCC, you have freedom to put.

3. All the emails sent SUCCESSFULLY will remain in white background color : The emails sent successfully will remain in WHITE BACKGROUND.

4. All the emails which are FAILED, will be marked in RED Background Color : The emails which could not be sent successfully will be marked as RED BACKGROUND

5. Number of Successful and Failed Email Sent will be displayed at the end: On top of the Tool, below the Selection Area, at the end of the Mail Sending Process, Total Number of Successful and Failed records will be displayed.

5. Error Description: In Excel Sheet there is a Column for the Error Description. For all the Emails which are failed, Error Description will be put there. For Successful mails, it is set to blank.

Kindly provide me Feedback and Suggestion to improve this tool. Based on your suggestions and feedback, soon a New Version of this Tool will be published with more features as suggested

 

Download Now

Buy a coffee for the author

Adsense

Download FREE Tools and Templates

There are many cool and useful excel tools and templates available to download for free. For most of the tools, you get the entire VBA code base too which you can look into it, play around it, and customize according to your need.

Convert PDF Tables to Excel with VBA | Step-by-Step Guide
Convert PDF Tables to Excel with VBA | Step-by-Step Guide

Convert PDF Tables to Excel with VBA | Step-by-Step Guide How to Convert PDF Tables to Excel Using Excel VBA (Macros) Extracting data from PDF tables into Excel can be tedious, but with Excel VBA (macros), you can automate this process and save time. This guide will...

Dynamic Arrays and Spill Functions in Excel: A Beginner’s Guide
Dynamic Arrays and Spill Functions in Excel: A Beginner’s Guide

In today's tutorial, we'll be diving into the exciting world of dynamic arrays and spill functions in Office 365 Excel. These features have revolutionized the way we work with data, providing a more flexible and efficient way to handle arrays. I am going to explain...

How to Declare a Public Variable in VBA
How to Declare a Public Variable in VBA

While programming in VBA sometimes you need to declare a Public Variable that can store the value throughout the program. Use of Public Variable: Let's say you have 4 different Functions in your VBA Code or Module and you have a variable that may or may not be...

What is Excel Formula?

Excel Formula is one of the best feature in Microsoft Excel, which makes Excel a very very rich application. There are so many useful built-in formulas available in Excel, which makes our work easier in Excel. For all the automated work, Excel Macro is not required. There are so many automated things can be done by using simple formulas in Excel. Formulas are simple text (With a Syntax) which is entered in to the Excel Worksheet Cells. So how computer will recognize whether it is a formula or simple text? Answer is simple.. every formula in Excel starts with Equal Sign (=).

You May Also Like…

VBA: Reverse a string

It is very easy to get the Reverse of a string entered by user in Excel VBA by using VBA inbuilt functionality....

read more

63 Comments

  1. Rishi

    Loved the tool…awesome job dude…U Rock m/

    Reply
    • Vishwamitra Mishra

      Thanks Rishi !!

      Reply
  2. SVSK

    Grt creation dude 🙂 Keep going !

    Reply
    • Vishwamitra Mishra

      Thanks SVSK !!

      Reply
  3. Milin Desai

    Hello Vishwamitra Mishra,

    I have tried using these file, but when i tried sending mail using outlook, its giving me compile error..saying "Cant file project or library"

    I am working on this project where from excel, we have to send people their KRAs, KPIs, and other things. I would request you to help me taking this furhter. I have this file where i have columns from A to Z, where first column employee name,second has the project he is working on and so on so forth. likewise, i have data of more than 400 employees. What we want is to send email to employees, with their respective data in all the columns. We can have one more column added where we can have their mail ids added.

    Do let me know if you want me to send you the file i am talking about.

    Thank you very much in advance,

    Milin Desai

    Reply
    • Vishwamitra Mishra

      Yes please, Send me your file and how you want. I will get back to you.

      Thanks,
      Vish

      Reply
      • Milin Desai

        Hi, can i please have your email id ?

        Reply
        • don

          fix web site so it doesnt show social media icons on a mobile browser. covers up words

          Reply
        • Vishwamitra Mishra

          Yes Please !!

          Reply
      • alok singh

        Hi,

        I have tried using these file for outlook 2007, but when i tried sending mail using outlook, its giving me compile error..saying “Cant file project or library”

        Please reply me ASAP.

        Regards,

        Alok Singh

        Reply
        • Vishwamitra Mishra

          Hi Alok,

          You can download the latest version the same tool which has attachment functionality as well, from this below link and see if you are still facing the same issue?

          http://www.learnexcelmacro.com/2012/11/download-e

          Thanks,

          Vish

          Reply
          • alok

            Hi,

            Still i am unable to send mail. i am not getting any mail in outbox or send item in my outlook.

            Regards,

            Alok

  4. Tejinder

    connecting to smtp not happeninig. check your id and password and try again

    Reply
    • Vishwamitra Mishra

      Hi Tejinder,

      Kindly enter correct ID and Password and try. It will work.

      Thanks,
      Vish

      Reply
  5. saurabh

    Dear Vishwamitra,

    I downloaded your tool for mailing to multiple people from excel mailing list. But i want a mail to carry a image and formatted in html. with personal signature etc.

    sorry I have sent this request in some other topic. I have downloaded the tool mentioned in this discussion. Now would request you to help me. So that I can send html mail

    Cheers

    saurabh

    Reply
  6. Vishwamitra Mishra

    Hi Saurabh,

    In the mail body you need to add this for HTML body:

    With NewMail

    .Subject = Subject

    .To = StrToEmail

    .Cc = StrCCEmail

    .BCC = StrBCCEmail

    .HTMLBody = “Here you can put the HTML code for your email with your Signature, Image etc.”

    End With

    Reply
  7. E

    Hi Vishwamitra Mishra,

    I have a macro that sends an email to approx 100 different, specified email addresses depending on which option has been selected from a drop-down menu on a particular sheet. However, I need the macro to get the entire workbook to calculate each time before it sends the next email in order for the sheet that is attached to each email to recalculate from another sheet properly. Is this possible?

    I hope this makes sense and that you are able to assist please.

    Kind regards,

    E.

    Reply
    • Vishwamitra Mishra

      Hello,

      Yes it is possible and i will be able to help you on this if you let me know more information about this.

      Thanks,
      Vish

      Reply
  8. nur

    Dear vish Bhaia,

    Couple of Month ago I downloaded your tools , and I was successfully sending

    The mail to my lots friends. From today I got some error like Error in loading DLL

    Where the problem, I didn’t modify your exiting code it is as it was, even today I download it from your web, the same problem showing. I have change the PC but

    The problem is not solving. Please advice me as it is very much required for my daily work

    thanks,Nur

    Reply
  9. Dip

    HI, Is there any way I can attach file as well?

    BTW awesome tool..:)

    Regards,

    D

    Reply
    • Vishwamitra Mishra

      Hi Dip,

      Yes you can attach the file as well but this tool is not designed in such a way.
      By 14th-Nov, there is another version of this tool is going to come..which have attachement functionality as well with many other changes.

      Thanks,
      vish

      Reply
      • Dip

        Thanks

        Reply
  10. Mark Lombardo

    Vish, I was wondering if you would recommend deploying an Excel VBA application to over 100 clients that have all different operating systems and platforms to mail back a worksheet. I would like the event to occur in the background so that the 100 or so clients wouldn't even know that it is happening. I feel the main issue is finding or determining each users port and SMTP server within the Excel VBA code to make this work. Do you have any thoughts on how difficult that may be?

    regards,

    – Mark –

    Reply
  11. Kamalakannan R

    Excellent tool… Vish.

    Can we add an attachement.

    Reply
  12. alok

    Hi,

    Now using new version. Still i am unable to send mail and not getting any mail in send item and outbox.

    Regards,

    Alok Singh

    Reply
  13. ha long bay

    Attractive section of content. I simply stumbled upon your weblog and in accession capital to assert that I get actually enjoyed account your weblog posts. Anyway I'll be subscribing in your feeds or even I success you get entry to persistently rapidly.

    Reply
  14. Yogi

    Hi,

    this sheet is not working please have a check and replay back me asap.

    Below mention error getting after clicking the send all emails.

    "The transport failed to connect to the server.

    (-2147220973)"

    Reply
  15. amar

    Hi Vishwa i want to work on internet by pasting cell value on net and saving at the time and clicking on checkbox on net …is it possible to work on net by vba please reply

    Reply
      • Omveer Singh

        Respected Sir,

        Kindly share the password of VBA. It's an humble request.

        Regards

        Omveer Singh

        Reply
  16. muthu

    hi vishwa the file is really superb but 1 request while sending mail it is asking password what is the password to send mail can u tel me?

    Reply
  17. sandeep

    Hi,

    I have just want to see the vba code for this tool but when i click on view macro so there is no option of edit.could you provide some information to see the code of this tool for some learning.

    Thanks

    Sandeep

    Reply
  18. Merry

    Hi Vishwamitra

    Thanks a lot for your great tool it has helped me lot in my daily work but if you could help me by letting me do some change in the macro that is I want to insert a image in each and every image inspite of the the value.

    It is written in the macro

    Set NewMail = OlApp.CreateItem(olMailItem)

    With NewMail

    .Subject = Range("E" & i).Value

    .To = Range("B" & i).Value

    .CC = Range("C" & i).Value

    .BCC = Range("D" & i).Value

    .Body = Range("F7").Value

    So please tell what to write inspite of value. I want to insert a image or a format

    Thank you

    Merry

    Reply
  19. Jagdev

    Hi

    I am facing error “Compiler error: Can’t find project or Library”. I checked the reference and they are fine.

    Specifically on “olFolderInbox” “Set myInbox = myNameSp.GetDefaultFolder(olFolderInbox)”

    Please shed some light on it.

    Regards,
    JD

    Reply
  20. Aby George

    Hi Vishwa, Do you have a macro personalized emails from Lotus notes to multiple users. I want to send the password to 200 users separately.

    Reply
  21. Sooraj

    Hi Team,
    I need to mail the word document(Contains links and images) as email body. PLease help

    Reply
  22. Sridhar

    Hi,
    AM able to send only from default mail in outlook.How can send from multiple accounts configured in outlook . It would be great if you can add another from field in your tool so that email goes from that account.Waiting for your reply.

    Reply
  23. Manish

    Hi Vishwa

    I am facing error “Compiler error: Can’t find project or Library”. I checked the reference and they are fine.

    Specifically on “olFolderInbox” “Set myInbox = myNameSp.GetDefaultFolder(olFolderInbox)”

    Please guide / Help

    Reply
  24. Kapish

    Hi,

    I have one query with this code.

    How do I modify the code if I want to send multiple emails through a shared mailbox in Outlook.

    Right now, when I run the macro, it sends the mails from my personal address. How to change this so that the emails can be sent by a shared mailbox address?

    Kind Regards
    Kapish

    Reply
  25. Dattu

    Hi Friend

    could you please help me on below requirment

    Objective: send a emil from excel sheet with multiple lines

    excel column fields:
    from email iD
    To Eamil id
    CC email id
    Bcc email id
    Suejct Line
    Body of email
    also i need a 2 X 4 Table with filds
    i.e 1) Text1 2) Text 2 3) Text 3 4)Text 4 5)Text 5 6) Date format 7) Text 7 and 8) Amount in $

    At last Signature part

    Reply
  26. Gurvin Singh

    The macro removes the default signature.

    Can we send emails with the default signature intact?

    Thanking you in advance.

    Regards.

    Reply
  27. tieumaccan

    Hi,

    Thanks for your macro, actually that would be great if this tool can:

    1. i have a master file from column A to Z => if i want to split to supplier name as column B (since this file as 1000 lines with different purchase order number and quantity) = > the file will be split into the folder i want with title of the file is the name of supplier

    for example: column A Purchase order number: 12345, column B: supplier tieumaccan; column C: Q’ty : 1000 pcs ….

    => the file name is tieumaccan with the content only for vendor tieumaccan information
    => i commend the macro to save all the files to folder D:PXTMacro

    2. after the file are split and i input all the name with address like this, the macro will automatically send to the recipient together with the file (not manually like yours)

    this is an idea i got from the macro of my previous company; unfortunately; i can not save or use if my account is deleted in that company’s system

    hope that this idea can trigger something for you

    Thanks

    Reply
    • tieumaccan

      besides, the signature something i think we can copy and put in the column “Body”; however, is that possible we only need to input for ONE cell of body of email? the rest will capture the same content.

      Thanks for your support.

      Reply
      • Vishwamitra Mishra

        Ofcourse It is possible to build but it really depends, if it is really needed to have this feature. I will rethink on this and may be I can build this feature In the next released as I mentioned before. Nevertheless thanks for sharing your thoughts on this.

        Reply
    • Vishwamitra Mishra

      Thanks for sharing your thoughts and ideas on this tool to improve. I will definitely consider this in my next version when I am releasing. Thanks again. Keep sharing your thoughts and ideas like this.

      Reply
  28. juan francisco

    hi vishwamitra!!

    i need you help, i have a vba macro in excel in one sheet Automatically generated for sending emails, In column b I have the email address, column c I have the department, column d the departmen and in the column I have the path and the name of the pdf file to send, but I do not know how to send a only one email per department and address Of email with all the pdf files corresponding to that department,

    thanks for all

    Reply
  29. bhaskar guptha

    hi,

    we need Send Multiple Email for gmail account & diffrenet body of message

    Reply
    • Vishwamitra Mishra

      Hi Bhaskar,

      I have a tool for this which you can download it from here
      Let me know if this solves your problem

      Reply
  30. Juan

    dear Mishra, do you have this vba program to add a chart in the body of the email to be send from yahoo?

    Reply
  31. Preethi

    Hi,

    Do you mind sharing your VBA password to view the code?

    Really appreciate if you could.

    Thanks

    Reply
  32. ratha

    Hi

    I want to know how to write down code VBA spell Number to Words
    example1 – one thousand three hundred and ten piece only. how to write down it
    example2 – one thousand three hundred piece only. there is no ( and ) if no one behind hundred

    Reply
  33. Manoj

    Hi Viswamitra, while sending through other than outlook, it is asking for server details. After updating, again asking VBA Project Password.

    Pls help… manoj.sahoo@hdbfs.com

    Reply
  34. Gresh

    Hey! Great workbook, can I change who the email goes from? Right now It is going from my own email – I need it to go from a business email?

    Reply
  35. Sankha Subhra Das

    Dear Mishraji,

    The tool works like wonder. If you can develop something in the tool that same attachment can be sent to multiple users.

    Reply
  36. Avanish Pachauri

    Macro is not working on 64-bit system, Could you please help on this wonder file??

    Reply

Trackbacks/Pingbacks

  1. VBA code for sending email from Gmail or yahoo - LearnExcelMacro.com - […] DOWNLOAD : EXCEL MACRO APPLICATION TO SEND MULTIPLE EMAILS […]

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Join and get a FREE! e-Book

Don't miss any articles, tools, tips and tricks, I publish here

You have Successfully Subscribed!

Pin It on Pinterest