Hello Friends,
I got many good response on the tool – Send Multiple Email Workbook. I also got a request to implement much other functionality as well. The attachment was one of them. In this version, I have added the attachment functionality with some other small fixes. Download the latest file from the end of this article and let me know your feedback.
New Features:
1. Attachment: You can add up to 5 attachments to each email. There are two ways of attaching a document to the mail:
- i) You can directly type the path of the file which you want to attach in the Corresponding cell as shown in the picture
- ii) Select the cell where you want the file path and click on the Browse button. Select your file and click Ok. You are done. The complete URL of that file will be pasted in that cell.
Old Features:
1. Using this Tool you can send an unlimited number of individual emails: What is Individual Mail? If you want to send an email to 1000 different email IDs, ONE by ONE, means you are not keeping all the 1000 IDs in the TO list, and sending one single mail, is called individual mail. In such a case it becomes very difficult to send the same email 1000 times. This tool will help you do 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 the freedom to put it.
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. A 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, the Total Number of Successful and Failed records will be displayed.
6. Error Description: In Excel Sheet there is a Column for the Error Description. For all the Emails which are failed, an Error Description will be put there. For Successful mails, it is set to blank.
Its amazing sharing friend..
But can we have the access of VBA code?
Can you please provide us password for VBA..?
Thanks,
Rajveer
Hi Vish,
This is an amazing tool!
Is there a way to keep the formatting I have in the body cells of the excel file in the email as well? So if I have words bolded/underlined in the excel cell, they will stay bolded and underlined in the email?
Thank you for this wonderful creation!
Best,
Shiv
Hi Shiv,
Yes now you can do so. There is a new version available of the same tool. You can download it from
http://learnexcelmacro.com/wp/2014/04/send-mu…
Hi Vishwa,
How to embed the picture, graph or table in the body of the email. If I have to embedd multiple graphs or tables in the body of the email, is that possible?
Thanks
Dhanush Anand
Hi Dhanush,
Please refer this article. Yes it is possible to attach as many graphs as you want.
Dear Vishwa,
I have tried to embed the picture, graph or table in the body of the email. But not able to do kindly help to me since I am not having much knowledge about macro.
please help me out to download this file
i have downloaded it but its not getting opened
i am using excel 2003.please help me to use this feature developed by you.
thanks in advance
Hi,
You can use this latest version. Let me know, if you are still facing the issue.
http://learnexcelmacro.com/wp/2014/04/send-mu…
How to CC multiple people?
Yes you can !! Try the latest version of this tool
http://learnexcelmacro.com/wp/2014/04/send-mu…
Hi,
It is really cool tool. Thanks for sharing it. I have few suggestions
1.in to and cc section mulitple email ids should be accomodated as we may need to copy the email to many people.
2.while attaching it should allow to select multiple attachments @ once.
Hi,
Now you can do both in the latest version of this tool
http://learnexcelmacro.com/wp/2014/04/send-mu…
Hi,
This is an amazing tool!
Is it possible to use .display to send manually insted .Send that Will send it straight away?
I am not able to edit the macro…
Thanks
Hi,
First let me congratulate you for preparing such a awesome tool.
My email body has the minimum lenth of 2000 character and i am not able to see that in excel.
Request you to help on the above matter.
Regards,
Jeetesh
Hi friend,
Please provide the password for VBA, I need to use the code in one of my project tool.
Thanks in advance!!
Regards,
Himanshu Gupta
Respected Sir,
Kindly share the password of vba code.
Regards
Omveer Singh
In Outlook, while sending multiple mails, i get a warning whether to Allow or Deny to send the mail…
Dear Gnanaprakash,
That is because of the security settings in your Outlook. You can lower the security in your outlook and it will be fine if you want.
Thanks for your reply… i got rid of the warning..
is there any way to send mails using different from address i.e from my BA (Business Address)and not PA(Personal Address)?
and i m sure your not gonna share the VB Password…
but can you post the snippet used to send the mail function?
thanks in advance…
Dear Gnanaprakash,
Glad that you got rid of the security message in outlook.
If your business mail is providing a connection method then ofcourse it is possible. But generally your business email will be configured on Outlook and in that case no matter which email ID is configured on outlook, this excel will send email through your business or personal IDs.
There are many articles written with code snippets of sending email using Outlook, gmail yahoo etc. you can go through them.
http://learnexcelmacro.com/wp/excel-macro-tutorial/
Hi Vishwa,
My name is Akash currently working in bangalore, first thanks for the above macor this is really very good. Just wanted to know to do you conduct Macro clases also ? because i am really interested to learn coding.
Let me know
Akash
Thanks Akash !!
I have not started taking VBA classes but in future I am planning to do so as I am getting many request through my site.
gv me password
m using lotus notes in ofc n need to change coding bcz in dat liat lotus in not avilable
Good utility
Private Sub cmbSelectEmail_DropButtonClick()
If cmbSelectEmail.ListCount 8 Then
cmbSelectEmail.Clear
With cmbSelectEmail
.AddItem “Outlook”
.AddItem “Gmail”
.AddItem “Yahoo”
.AddItem “Hotmail”
.AddItem “Rediffmail”
.AddItem “AOL”
.AddItem “Netscape”
.AddItem “Others”
End With
End If
End Sub
Private Sub cmdSendEmail_Click()
Application.DisplayAlerts = False
If cmbSelectEmail.Value “Outlook” Then
If Range(“B7”).Value = “” Then
MsgBox “At least One Email Should be there to be sent”
Exit Sub
End If
frmSendEmailOption.Show
Else
Call SendEmailUsingOutlook
End If
Application.DisplayAlerts = True
End Sub
Private Sub CommandButton1_Click()
DoEvents
lblProgressBar.Width = 1
lblProgressBar.Caption = “0%”
Sheet1.Label1.Caption = “#Emails Successfully Sent: 0 #Emails Failed: 0”
cmbSelectEmail.Value = “Outlook”
End Sub
Private Sub CommandButton2_Click()
On Error GoTo err
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.ButtonName = “Select”
.AllowMultiSelect = False
.Title = “Choose Attachments”
.InitialView = msoFileDialogViewDetails
.Show
End With
Selection.Value = fd.SelectedItems(1)
err:
Hi Vishwa,
Your blog is very helpful! I have a small and (easy for you..not me) macro project that I am working on. It is basically macro to send multiple emails + macro to send HTML from word doc.
We would be willing to pay for your assistance. If interested, can you please contact me?
Thank you,
Katheryn
Dallas, TX
I m have installed windows live mail in my pc. so please confirm me how it will work without using outlook.
But can we have the access of VBA code?
Can you please provide us password for VBA..?
Thanks in Advance
Mangal
I want to send all the mails without any warning.. Please help on this.
Hi,
I have run the tool successfully on my company outlook however when I used the same file for my client network (client Outlook) it has given error on
Call sendmail
It stucks here… no idea what is happening as when I used the same file on my normal system it is working fine. Can you please help me
Dear Ankeet,
Kindly share me the error you are getting while running the tool in your client’s machine. To get the error, I would recommend you to run the code in debug mode. If you do not know how to run VBA code in debug mode, kindly refer this article : http://learnexcelmacro.com/wp/2015/12/debug-vba-code/
Hi,
Can you please share VBA password
Dear Vishwa,
If it is possible can u provide the password
hi,
this is really good, but if you can help us with the macro which can attached 1 or more file from the folder with the name of the file as an option for selection.
I mean all the files to be send can be saved at a common location and basis file name the attachment can be picked up against each recipient.
Please help.
Rukshi
Hi Rukshi,
Glad that you liked the article.
Meanwhile to solve your problem, you can refer to my Send Email Tutorial Page where you can find all different ways to send an email with/without attachment etc.
You can read different articles which I have written around folders and files : http://learnexcelmacro.com/wp/2011/11/how-to-get-list-of-all-files-in-a-folder-and-sub-folders/
Let me know if you are able to find the solution for your problem explained above.
Thanks for taking out the time to reply me,
I am very new with macros, it would be helpful if you can help me with the macro file for sending out emails to different people with one or more than one attachment saved in one folder.
Right now I am using the below macro, please suggest what changes can be done here so that it fetches the singular or multiple attachment also.
Public Sub sendWS()
Application.DisplayAlerts = False
fpath = Range(“G1”).Value
On Error GoTo Finally
For i = 2 To Application.WorksheetFunction.CountA(Columns(2))
fname = Range(“C” & i).Value & “.” & Range(“H2”).Value
flname = fpath & fname
Dim oOutlook As Object
Dim oEmailItem As MailItem
On Error Resume Next
Set oOutlook = GetObject(, “Outlook.Application”)
If oOutlook Is Nothing Then Set oOutlook = CreateObject(“Outlook.Application”)
Set oEmailItem = oOutlook.CreateItem(olMailItem)
With oEmailItem
‘.SentOnBehalfOfName = “IndiaExpensemgmt”
.ReadReceiptRequested = False
.To = Range(“D” & i).Value
.CC = Range(“E” & i).Value
.Subject = Range(“A” & i).Value & “_” & Range(“B” & i).Value & “_” & Range(“H1”).Value
.Body = “Dear All, ” & vbNewLine & vbNewLine & Sheets(“Email Content”).Range(“A3”).Value & vbNewLine & vbNewLine & Sheets(“Email Content”).Range(“A5”).Value & vbNewLine & Sheets(“Email Content”).Range(“A6”).Value
TurnSpellingOff
.Attachments.Add flname
.Display
.Send
‘Set myInspector = objMail.GetInspector
‘myInspector.Activate
‘Application.Wait (3)
‘ SendKeys “%s”, True
‘ SendKeys “%s”, True
‘ SendKeys “%s”, True
‘SendKeys “%s”, True
‘SendKeys “%s”, True
‘SendKeys “%s”, True
‘SendKeys “{ESC}”, True
‘SendKeys “%{y}”, True
End With
ActiveCell.Offset(1, 0).Select
Next i
Finally:
OlSecurityManager.DisableOOMWarnings = False
Set oEmailItem = Nothing
Set oOutlook = Nothing
MsgBox “Done”, vbInformation, “Workstream”
End Sub
Sub TurnSpellingOff()
Const KEY_VALUE = “HKCUSoftwareMicrosoftOffice11.0OutlookOptionsSpellingCheck”
Dim objShell As Object
Set objShell = CreateObject(“WScript.Shell”)
objShell.RegWrite KEY_VALUE, 0, “REG_DWORD”
Set objShell = Nothing
End Sub
——
In my excel under column C I have to write the file name which is to be attahced, I have read somewhere that if multiple attachement is to be added that one has to write the file name with ; as a separate, but I dont know where in my code above I have to incluce this..
Please help me…
Rukshi
Hi Rukshi,
You can use the latest version of the same tool here : http://learnexcelmacro.com/wp/2014/04/send-multiple-email-tool-ver-3-0/
In this version, you can add multiple attachments for each email
Thanks so much, this one if great, but here again I have to select multiple attachments 🙁
The macro is awesome it can help enormously as I send about 500 emails daily.
There is one big issue, I keep on getting a prompt saying “A program is trying to send an email on your behalf etc.. ”
And I must click “Allow” for each email to be sent.
I tried going in to my outlook mail setting, the allow button is not highlighted by me and in the big company I work for they will not allow to disable..
What do I do?
Please help.
Thank you,
Zak.
Working !
I found this outlook add on https://www.mapilab.com/outlook/security/
which disabled the warning.
I don’t know if this is good or not.
Please advise.
Hi,
This is an amazing
kindly share the password to my email id.
Hello Vishwa,
Thanks for providing us such a nice tool. But this is not working on 64-Bit systems. Can you please look into this.
Thanks,
Vishesh
visheshgolya@gmail.com
+91-80056-90366
Hello,
I’m trying to run this VBA, but the error message is Could not complete the operation. One or more parameter values are not valid.(-2147024809)
Am I doing something wrong?
many thanks
Hi Ankeet,
It would be great if you can share the VBA password please
Select which ones to send
I would like to see if there is a way to select which emails to send. Maybe a checkbox
Hi
I have problem with outlook Email. its not send through it
This is brilliant… Is there anyway for it to grab information i require from a Excel spread sheet.. I.E Name.. and import it on to the email template automatically
Hi,
Your solution working is great, could you please help with VBA password to customize few things.
Thanks in advance
Regards
CD
respected sir this your tool is wonderful please share VBA password
mail ID and Password incorrect coming on dialog box of SMTP Server where I entered my mail id and password. i am using version 3
Hi, thank you for the tutorial, i need your help, i try to create a VBA Excell to send an email automatically when i press the button. but i got some error, here’s the error “Object doesn’t support this property or method”.
here my code
Sub kirim_email()
Dim Outl As Object ‘Deklarasi Object
Dim Msg As Object
Dim Atch As String
‘Set Object Outlook
Set Outl = CreateObject(“Outlook.Application”)
Set Msg = Outl.CreateItem(0)
‘ Memisahkan Sheet2 untuk Attachment
ThisWorkbook.Worksheets(“STG_TRX”).Copy
Atch = ThisWorkbook.Path & “\STG_TRX.xlsx”
With ActiveWorkbook
.SaveAs Atch
.Close 0
End With
Set Msg = Outl.CreateItem(1)
‘ Memisahkan Sheet2 untuk Attachment
ThisWorkbook.Worksheets(“STG_TRX_BILLER”).Copy
Atch = ThisWorkbook.Path & “\STG_TRX_BILLER.xlsx”
With ActiveWorkbook
.SaveAs Atch
.Close 1
End With
‘ isi Item
Msg.To = Sheet13.Range(“B2”).Value
Msg.CC = Sheet13.Range(“B3”).Value
Msg.bcc = Sheet13.Range(“B4”).Value
Msg.Subject = Sheet13.Range(“B5”).Value
Msg.HTMLBody = “Dear All, Terlampir data WOW iB ”
Msg.Attachments.Add Atch = ThisWorkbook.Path & “\STG_TRX.xlsx”
Msg.Attachments.Add Atch = ThisWorkbook.Path & “\STG_TRX.xlsx”
Msg.Recipients.ResolveAll
Msg.Display
Msg.Send
End Sub
in this code i try to copy from another sheet to be an attachment in email (sorry for my spelling word 🙂 ). if i just to sent email with 1 attachment, this code is working, but if i try to sent email with 2 or 3 file together, my code got error.
kindly need your help. please tell me and teach me for this error (this is my email ibadurrahman.asshiddiqi@gmail.com)
Thank you for your help,
Regards,
Diqi
Hello, I would like to use your template. It is great, but I would like to verify just one thing, is it safe to use? the codes are hidden so I am concerned if it collects data that we may use in your template or if it collects other data from our system.
Please let me know,
Thanks a lot,
Hello, I would like to use your template. It is great, but I would like to verify just one thing, is it safe to use? the codes are hidden so I am concerned if it collects data that we may use in your template or if it collects other data from our system.
Please let me know,
Thanks a lot,