Send Emails to Multiple Persons with Multiple Attachments

  Рет қаралды 63,335

Dinesh Kumar Takyar

Dinesh Kumar Takyar

Күн бұрын

How to send emails to multiple persons with multiple attachments automatically with VBA.
Here's the complete VBA code:
Option Explicit
Sub sendEmailsToMultiplePersonsWithMultipleAttachments()
'NOTE: Because KZbin doesn't allow angular brackets 'NOT GREATER THAN' and 'NOT EQUAL TO' have been inserted in the code
Dim OutApp As Object
Dim OutMail As Object
Dim sh As Worksheet
Dim cell As Range
Dim FileCell As Range
Dim rng As Range
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set sh = Sheets("Sheet1")
Set OutApp = CreateObject("Outlook.Application")
For Each cell In sh.Columns("A").Cells.SpecialCells(xlCellTypeConstants)
'path/file names are entered in the columns D:M in each row
Set rng = sh.Cells(cell.Row, 1).Range("D1:M1")
If cell.Value Like "?*@?*.?*" And _
Application.WorksheetFunction.CountA(rng) GREATER THAN 0 Then
Set OutMail = OutApp.CreateItem(0)
With OutMail
.to = sh.Cells(cell.Row, 1).Value
.CC = sh.Cells(cell.Row, 2).Value
.Subject = "Details attached as discussed"
.Body = sh.Cells(cell.Row, 3).Value
For Each FileCell In rng.SpecialCells(xlCellTypeConstants)
If Trim(FileCell.Value) NOT EQUAL TO "" Then
If Dir(FileCell.Value) NOT EQUAL TO "" Then
.Attachments.Add FileCell.Value
End If
End If
Next FileCell
'.Send
.display
End With
Set OutMail = Nothing
End If
Next cell
Set OutApp = Nothing
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
End Sub

Пікірлер: 291
@arundev1
@arundev1 Жыл бұрын
Dear Sir, People like you are the true gems, true guru's. The way you teach really is exceptional, expecting more of such from you.
@sokolataras79
@sokolataras79 Жыл бұрын
Man you saved our asses and our souls at the same time....GOD BLESS YOU!!!
@AmarjitSingh-wn7ct
@AmarjitSingh-wn7ct Жыл бұрын
Thank you sir. I was trying from long time and searched many sites to create a macro to send multiple attachments in a single mail but finally get a solution from you.....thank you very much
@sandiegoguy1983
@sandiegoguy1983 3 жыл бұрын
Thank you for the script. You saved me 20 minutes a month. It's not a lot of time savings BUT all of my incremental improvements add up.
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Keep watching and also share with your friends too.
@linaa7950
@linaa7950 3 жыл бұрын
Dear Mr. Takyar, Thank you very much for your kind information. I am a teacher and I get a lot of emails and I have wanted to send an automatic reply with different attachments to different students. They will be sending me emails with different subject lines or body text to explain what they need. Thank you very much. From Paris.
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
These links will also guide: www.exceltrainingvideos.com/tag/auto-acknowledge-receipt-of-mail-with-a-unique-tracking-number/ www.exceltrainingvideos.com/automatically-send-email-to-users-queries-in-excel-with-vba/
@linaa7950
@linaa7950 3 жыл бұрын
@@Exceltrainingvideos Sir, Thank you. However what I want is:- I get an email from student ABC asking for precise .doc or PDF which is named Paris.doc and same time I got another email from student EFG asking for doc file named as London.doc Please help me Sir.
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Try this: kzbin.info/www/bejne/rZu2p6KNnMdogs0 and kzbin.info/www/bejne/eobCh5prhq90gbM
@linaa7950
@linaa7950 3 жыл бұрын
@@ExceltrainingvideosSir, Thank you. Please do check your email inbox. I have found your email ID on one of your youtube videos. Sorry to send you an email without asking your permission.
@scatterinc1423
@scatterinc1423 10 ай бұрын
Hi Dinesh.. Thanks for this.. it so helpful. Two questions 1. How do i add hard text from the macros + picking up text from the excel sheet? 2. How do I choose the email to send from? I have several email addresses in my outlook.. how do I choose which one to send from. Currently I have to .display and then select the send from email address.
@roro_fosho
@roro_fosho 2 жыл бұрын
Dinesh - you are a legend, thank you so much for being you!
@Exceltrainingvideos
@Exceltrainingvideos 2 жыл бұрын
God bless!
@suleymanbey2896
@suleymanbey2896 4 жыл бұрын
Hi. Is there a command that will automatically click send button? Everything is automatic, but the send button click is manual.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Good question!
@stephenwachira3306
@stephenwachira3306 4 жыл бұрын
This would be nice to have.
@ChezEds
@ChezEds 4 жыл бұрын
just remove the ' in '.Send Next FileCell '.Send .display End With
@JustonclicksBlogspotIn
@JustonclicksBlogspotIn Жыл бұрын
I need your help sir with one code. How to filter based on customer name and send their individual data to all customers in a single click. so basically its filter their data and convert their data as a PDF file and send to all the customer individually
@niksarpate
@niksarpate 4 жыл бұрын
Really great 👍..Sir..please continue with such learning videos. For begginers it's more than a magic feeling..😊..Thank you..stay safe tc
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
So nice of you. Please share the VBA tutorials with your buddies too.
@venkataramana9277
@venkataramana9277 3 жыл бұрын
Thank you Dinesh, This is a great video for learning, my request to you is how can we combine 1. Send Emails to Multiple Persons with Multiple Attachments and 2. Send Email from Particular Mail box. Please help me as this would be very helpful for me
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
This Excel VBA tutorial in Excel will guide: kzbin.info/www/bejne/iGHUq5mPf9dpmpo
@terencexie2601
@terencexie2601 3 жыл бұрын
Hi sirs, I seem to have error msg: user-defined type not defined when I try to click Run. Pls advise
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
This link will guide: www.exceltrainingvideos.com/send-emails-to-multiple-persons-with-multiple-attachments/
@casamakim3560
@casamakim3560 4 жыл бұрын
500kb attachments is not included sir...
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
What's your question?
@FaisalAhmed-h7s
@FaisalAhmed-h7s 7 ай бұрын
Thank You Sir. Is it possible to share macro in any link?
@mayurmarathe4091
@mayurmarathe4091 2 жыл бұрын
Hello sir , I am able to create a sample pdf as receipt from xls macro and send using gmail and i am creating file name from particular cell value and run time creating folders for years/month etc and also storing file on my local system , now what i want is to send an email to particular user say b101 with his email id , but while i am addind .Addattachment it is not ablel to pick automatically the value and send that file as an attachment
@stephenwachira3306
@stephenwachira3306 4 жыл бұрын
Hello Dinesh, thank you for the video it's easy to understand and follow.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Thanks. Please share with your friends.
@gerardbakker261
@gerardbakker261 4 жыл бұрын
Thank you Dinesh, another great video for learning
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
You're welcome. Please share with your friends also.
@unuldinmultime5374
@unuldinmultime5374 4 жыл бұрын
This is awesome! But I noticed that the body of the e-mail must be written in the C2 cell... Is there a chance let`s say if I have a certain e-mail template to use that template to send it ? If yes what changes should i need to do in VBA? Thanks in advance!
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
You'll have to tweak your code according to the cell addresses of the email template if its in Excel. This VBA tutorial will also help: kzbin.info/www/bejne/rZu2p6KNnMdogs0
@arya25800
@arya25800 4 жыл бұрын
Thank you so much sir.. It's Very helpful and this works for me even i modified it according to my need. 😊
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
So nice of you
@shashankrai5991
@shashankrai5991 2 жыл бұрын
Sir.. i have to send multiple ZIP files each of minimum 5mb but we have outlook email limitation 10 mb can you pls help me with the VBA code that will open new email once the attachment size crosses 10 mb
@hansonlee335
@hansonlee335 3 жыл бұрын
Thank you! But my macro does not recognize the file path on spread sheet. It is MS offfice 2013 and outlook object library 15. Can you please advise if there is any solution? it just said invalid directory :(
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Query not at all clear.
@sanjanamhatre3760
@sanjanamhatre3760 Жыл бұрын
Dear Sir, I have been facing error.. Can you check and confirm ? Option Explicit Sub sendEmailsToMultiplePersonsWithMultipleAttachments() Dim OutApp As Object Dim OutMail As Object Dim sh As Worksheet Dim cell As Range Dim FileCell As Range Dim rng As Range With Application .EnableEvents = False .ScreenUpdating = False End With Set sh = Sheets("Sheet1") Set OutApp = CreateObject("Object.Application") For Each cell In sh.Columns("A").Cells.SpecialCells(xlCellTypeConstants) 'path/file names are entered in the columns D:H in each row Set rng = sh.Cells(cell.Row, 1).Range("D1:H1") If cell.Value Like "?*@?.?*" And _ Application.WorksheetFunction.CountA(rng) > 0 Then Set OutMail = OutApp.CreateItem(0) With OutMail .to = sh.Cells(cell.Row, 1).Value .CC = sh.Cells(cell.Row, 2).Value .Subject = "SBU INBOUND Rate Annexure & Comm II - Old & Revised" .Body = sh.Cells(cell.Row, 3).Value For Each FileCell In rng.SpecialCells(xlCellTypeConstants) If Trim(FileCell.Value) "" Then If Dir(FileCell.Value) "" Then .Attachments.Add FileCell.Value End If End If Next FileCell '.Send .display End With Set OutMail = Nothing End If Next cell Set OutApp = Nothing With Application .EnableEvents = True .ScreenUpdating = True End With End Sub
@whitneymartinez2605
@whitneymartinez2605 4 жыл бұрын
Great video! Very Helpful. Thank you :D
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Glad it was helpful! Please share the Excel VBA tutorial with your friends too.
@suhailahmed8786
@suhailahmed8786 3 жыл бұрын
Hi sir how to add the receiver name in the body as Hi Naren,
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
These Excel VBA training tutorials will guide: www.exceltrainingvideos.com/how-to-use-automation-to-send-ms-outlook-mail-using-excel-vba/ www.exceltrainingvideos.com/send-numbered-message-automatically-through-outlook/ You can also search my website or this channel.
@ambervandenheuvel6183
@ambervandenheuvel6183 3 жыл бұрын
Hi there. I am trying to send emails but my organization does not use traditional email addresses with the @ symbol. We use a unique 7-digit identifier. My email at work is "AV12345". How can I edit the code to recognize the text instead of looking for the @?
@Exceltrainingvideos
@Exceltrainingvideos 2 жыл бұрын
Ask your system administrator how he converts the 7-digit identifier to an email address.
@irfanmujawar8310
@irfanmujawar8310 4 жыл бұрын
i am getting error in this cell "For Each FileCell In rng.SpecialCells(xlCellTypeConstants)" as Variable not defined
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
You should declare the variables correctly.
@joannasteinweiner7246
@joannasteinweiner7246 3 жыл бұрын
Hi - thank you for this video! I am getting an error on the Set OutApp = CreateObject ("Outlook.Application") step. When I go to tools & references my microsoft outlook shows "15" and not "16" like yours. I think I must have a much older version of office. Could you advise what I need to change the language to accommodate? Thank you!
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Use 15.
@sudhirpandey5787
@sudhirpandey5787 3 жыл бұрын
Sir I am getting an error message run-time error 429 ActiveX component can't create object
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Check your code by watching the video again!
@sudhirpandey5787
@sudhirpandey5787 3 жыл бұрын
@@Exceltrainingvideos ok sir
@9901028711
@9901028711 4 жыл бұрын
How to Keep "From Group Address". How to Keep BCC. And is there any possibility that we can directly browse for attachment from the Folders. Lastly in this Code Email Sent Code, Failed Code is Missing.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Check your code. BCC can be done like CC.
@aiveesy425
@aiveesy425 4 жыл бұрын
This is very helpful! You are a great teacher! How do you customize the email subject?
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Glad it was helpful! To customize the email subject you can capture data from the worksheet like for 'To' or 'Body.
@pot2376
@pot2376 3 жыл бұрын
Hi, any suggestions. Want to send multiple emails to different contacts/cc , with different headline and email body.
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Search my channel.
@vinayspoorthy
@vinayspoorthy 4 жыл бұрын
Can you share the code if we don't want to update the file path in columns but rather select the folder path and it should match pdf file name with column cell values say for an example pan numbers in excel to match to pdf file name which has pan number with year details.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
These VBA tutorials will help: www.exceltrainingvideos.com/how-to-loop-through-subfolders/ www.exceltrainingvideos.com/copy-specific-files-from-folder-and-subfolders-into-destination-folder/ www.exceltrainingvideos.com/how-to-open-folder-in-excel-using-vba/ www.exceltrainingvideos.com/tag/validate-alphanumeric-data-in-text-box-on-user-form/ www.exceltrainingvideos.com/validate-alphanumeric-data/ Or search www.exceltrainingvideos.com or this channel
@glaungani80
@glaungani80 3 жыл бұрын
Hi Dinesh, I am using MS Office 2016 and when I run the VBA code, it gives me the following error as a pop-up Run-time error '-2146959355 (80080005)': Server execution failed. When i click on debug it takes me to the line Set OutApp = CreateObject("Outlook.Application") ... and highlights this. Can you tell me what am i doing wrong, please? thanks,
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
This link will guide: docs.microsoft.com/en-us/troubleshoot/windows-server/application-management/error-8008005-when-start-complus-applications
@glaungani80
@glaungani80 3 жыл бұрын
​@@Exceltrainingvideos thanks for your reply. I changed the key in the registry editor (added,512 to SharedSection), restarted the computer, and still get the same error when I run the VBA script. any thoughts please?
@jafperchan382
@jafperchan382 3 жыл бұрын
hi sir, thank you so much for this video. the macro can send the emails successfully but can I check with you why doesn’t the emails appears in the Sent Folder? Thanks
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Check your code. '.Send .display Remove the apostrophe from Send and add an apostrophe to Display.
@redafouad6292
@redafouad6292 3 жыл бұрын
1 - it doesn't want to catch attachments. 2 - How can I write in email subject? Thanks in advance
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
This link will guide: kzbin.info/www/bejne/rZu2p6KNnMdogs0
@NavinKumar-og4dj
@NavinKumar-og4dj 4 жыл бұрын
Hi sir, I am getting a Run-time error '438' Object doesn't support this property or method, Can you please help me with this error
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Check your code. This link will help: www.exceltrainingvideos.com/tag/send-emails-to-multiple-persons-with-multiple-attachments/ Did you check the code given in the description accompanying this video?
@cyclingmc
@cyclingmc 4 жыл бұрын
Would love to see a more advance feature for each email have option to include specific verbiage for each email. This would probably require word mail merge set up. How would you do that? Everything in your video is great but add the option to add tailored email verbiage for each email. Thanks. Maybe future video? I’d be happy to make contribution for your efforts.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Thanks. Can you demonstrate verbiage with an example?
@cyclingmc
@cyclingmc 4 жыл бұрын
Dinesh Kumar Takyar your video tutorial is perfect. My question has to do with the email body only. Example: I have list of 40 people I need to send email and PDF attachments. For each email (40 people) I need to tailor the email body and subject line with specific data. Example email 1 subject: abc124-CL email body: Your assignment is below: abc-CL Area: England Contact Joe Hunger Email 2 subject: def-4321 email body: Your assignment is below: def-4321 Area: Idaho Contact: Hunter Pho Hope this explains better. Everything else in your video is perfect. I was just wondering if it was possible to have a more dynamic feature for email subject line and email body for each email recipient. If you send me your email we can discuss more specifics offline.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Got it! That will require much more coding.
@controllerofexaminations3095
@controllerofexaminations3095 2 жыл бұрын
respected sir please make a video mail merger multiple files with winword also. i am waiting for this with coding
@bryanpaulmarvinladi5770
@bryanpaulmarvinladi5770 4 жыл бұрын
Hi Sir, why .send is not working with error "Outlook does not recognize one or more names"
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Try again. The link to this VBA tutorial will guide: www.exceltrainingvideos.com/tag/send-emails-to-multiple-persons-with-multiple-attachments/
@eyyessyou
@eyyessyou 3 жыл бұрын
This was so helpful! Is there a way to just have the code send the emails without reviewing them?
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
This Excel tutorial will guide: kzbin.info/www/bejne/e3i7gYSpZbdoj6s
@billa19888
@billa19888 3 жыл бұрын
Sir can you help me please. I getting compiler error. Variable not defined
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Did you check the description accompanying the video carefully?
@billa19888
@billa19888 3 жыл бұрын
@@Exceltrainingvideos yes sir
@billa19888
@billa19888 3 жыл бұрын
Please help
@billa19888
@billa19888 3 жыл бұрын
xlCellTypeContants
@akanshasindhwal5951
@akanshasindhwal5951 4 жыл бұрын
Sir, It is showing compile error: syntax error and highlighting this If cell.Value Like "?*@?*.?*" And _ Application.WorksheetFunction.CountA(rng) GREATER THAN 0 Then
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Instead of GREATER THAN use >. Read the description accompanying the video.
@akanshasindhwal5951
@akanshasindhwal5951 4 жыл бұрын
@@Exceltrainingvideos Thank You, Sir. It's running but in more than 100 emails, it is getting Run time unknown error and asking to restart outlook.
@abukenan-qi6mc
@abukenan-qi6mc 3 жыл бұрын
How can I make each email folder its own when I send it takes all the attachments from this file and so on for each email
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Interesting question.
@KoiKeyes
@KoiKeyes 3 жыл бұрын
Hi thank you very helpful, when I try to run the code, nothing happens. No error, nothing. No outlook window comes up.
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
This tutorial will help: www.exceltrainingvideos.com/send-emails-to-multiple-persons-with-multiple-attachments/ Don't copy paste and check your code line by line.
@controllerofexaminations3095
@controllerofexaminations3095 2 жыл бұрын
Respected sir please make a video mail merger multiple files with winword also. i am waiting for this
@noeypattanit6906
@noeypattanit6906 3 жыл бұрын
Very Very helpful, Thank you so much
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Glad it was helpful! Please share the Excel tutorial with your friends too.
@sanathkumar5419
@sanathkumar5419 4 жыл бұрын
sir, i am working on a multipage inventory userform , i have four tabs, what i want is every time i change tabs i want to display a relevant listbox after a progress bar. is this possible, if so can you make a video with a example.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
OK
@aineciuladaite6487
@aineciuladaite6487 3 жыл бұрын
Hello, thank you, works perfectly! What should i add if i want to ship one row? I tried to add (') before email address in excel however its still sending
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
This VBA tutorial will guide: kzbin.info/www/bejne/joS1ZZqjd9qkn6c You can also search this channel or visit my website www.exceltrainingvideos.com/ for more solutions.
@riteshmishra251
@riteshmishra251 3 жыл бұрын
Great tutorial sir, I've a doubt sir. Can we automate this sending process because I need to hit sent button. How should I do it
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Remove the apostrophe from the '.Send' line of code and place an apostrophe before the '.display'.
@vidyakharate
@vidyakharate 3 жыл бұрын
Hello Sir, Thank you for the code it really helps. I have one query, my file path has some spaces in it then attachment is not happening when I run the macro. How can I overcome this scenario.? Kindly help. Thanks in advance.
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
I don't think that spaces in a file path matter. If you wish you can rename your files and directories or create new ones temporarily.
@himanshumaheshwari8753
@himanshumaheshwari8753 4 жыл бұрын
Run time error 438 is showing. I dont have any jetreports even.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Check your code again.
@salomithakur8514
@salomithakur8514 4 жыл бұрын
It gives an error. Run-Time error 429 ActiveX component can't create object
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Check out the code given in the description of the Excel video tutorial.
@kamranshaikh7455
@kamranshaikh7455 4 жыл бұрын
Hi Sir, can you please help me while creating multiples emails from excel If we want to copy paste multiple range in each drafts how we can copy paste through excel.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
The links to this Excel VBA tutorial will guide: kzbin.info/www/bejne/iqi3gZiZirSGlaM www.exceltrainingvideos.com/tag/send-numbered-message-automatically-through-outlook-using-vba/ Or search this KZbin channel or our website www.exceltrainingvideos.com
@kamranshaikh7455
@kamranshaikh7455 4 жыл бұрын
@@Exceltrainingvideos Thank you sir
@waelbaha
@waelbaha Жыл бұрын
amazing, many thanks
@nicjoy80
@nicjoy80 4 жыл бұрын
I am missing what he clicked on to declare variables. Can anyone help? That step is missing
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Watch the video again. Between 2 & 3 minutes.
@nicjoy80
@nicjoy80 4 жыл бұрын
@@Exceltrainingvideos Hello, thanks for your reply. I watch and am lost at 2:58. Can you tell me what you clicked to get the "Dim OutApp As Object...."?
@oswaldobg2304
@oswaldobg2304 2 жыл бұрын
Hi Sir, thanks for.this vídeo It really worked... What Should I do If I want to release automatically the emails??
@Exceltrainingvideos
@Exceltrainingvideos 2 жыл бұрын
Query not clear.
@oswaldobg2304
@oswaldobg2304 2 жыл бұрын
@@Exceltrainingvideos i was trying to see how to send the emails not only stop on Outlook preview, but I already found how to do that, thanks
@9901028711
@9901028711 4 жыл бұрын
Sir how to Keep/add " FROM Group email address" :- VBA code
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Will work on this idea.
@kishor9867566166
@kishor9867566166 2 жыл бұрын
very well done sir thanks
@Exceltrainingvideos
@Exceltrainingvideos 2 жыл бұрын
So nice of you
@nitinkhtri7936
@nitinkhtri7936 2 жыл бұрын
Hi sir it's very helpful can you tell me how can i add more then one mail ids in cc and to
@Exceltrainingvideos
@Exceltrainingvideos 2 жыл бұрын
This Excel VBA tutorial will guide: www.exceltrainingvideos.com/how-to-send-email-reminder-automatically-from-excel-worksheet-using-vba/
@nitinkhtri7936
@nitinkhtri7936 2 жыл бұрын
@@Exceltrainingvideos thanks sir got from the above link just need little more help can we add column as per the attachments
@sachinmasurkar4977
@sachinmasurkar4977 4 жыл бұрын
Hello Sir, I am sachin Masurkar, I am not getting email,also not showing any error.I have outllok office 365
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Try again carefully. Did you activate the Microsoft Outlook Library?
@shaileshsatam7527
@shaileshsatam7527 4 жыл бұрын
very helpfull for my daily work
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Happy to help.
@divyamaheshwaram2724
@divyamaheshwaram2724 4 жыл бұрын
Hello Sir. Thanks a bunch for the video. I receive Run time error type mismatch error for this line :If Dir(FileCell.Value) "" Then". Could you please help me to resolve this issue.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Can you share your code or read the description or visit www.exceltrainingvideos.com/tag/send-emails-to-multiple-persons-with-multiple-attachments/
@pritamgogoi2010
@pritamgogoi2010 3 жыл бұрын
​@@Exceltrainingvideos Sir, I am also getting same Run time error: If Dir(FileCell.Value) "" Then. please help on this.
@johnweniston5104
@johnweniston5104 4 жыл бұрын
Super sir it's working thanks a lot
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Welcome 👍 Please share the Excel VBA tutorial with your friends.
@vijayabhavani6103
@vijayabhavani6103 4 жыл бұрын
Sir thanks you are really awesome
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
So nice of you
@samayitanagray5345
@samayitanagray5345 4 жыл бұрын
Can you please show the code for doing the same using Gmail?
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
You can try this code which I got from the Net and tweak it according to your needs: 'For Early Binding, enable Tools > References > Microsoft CDO for Windows 2000 Library Sub SendEmailUsingGmail() Dim NewMail As Object Dim mailConfig As Object Dim fields As Variant Dim msConfigURL As String On Error GoTo Err: 'late binding Set NewMail = CreateObject("CDO.Message") Set mailConfig = CreateObject("CDO.Configuration") ' load all default configurations mailConfig.Load -1 Set fields = mailConfig.fields 'Set All Email Properties With NewMail .From = "youremail@gmail.com" .To = "recipient@domain.com" .CC = "" .BCC = "" .Subject = "Sending Email through Google Gmail" .Textbody = "Welcome to ExcelTrainingVideos.com" .Addattachment "Path to Your File" End With msConfigURL = "schemas.microsoft.com/cdo/configuration" With fields .Item(msConfigURL & "/smtpusessl") = True .Item(msConfigURL & "/smtpauthenticate") = 1 .Item(msConfigURL & "/smtpserver") = "smtp.gmail.com" .Item(msConfigURL & "/smtpserverport") = 465 .Item(msConfigURL & "/sendusing") = 2 .Item(msConfigURL & "/sendusername") = "youremail@gmail.com" .Item(msConfigURL & "/sendpassword") = "yourpassword" .Update End With NewMail.Configuration = mailConfig NewMail.Send MsgBox "Your email has been sent", vbInformation Exit_Err: 'Release object memory Set NewMail = Nothing Set mailConfig = Nothing End Err: Select Case Err.Number Case -2147220973 MsgBox "Check your internet connection." & vbNewLine & Err.Number & ": " & Err.Description Case -2147220975 MsgBox "Check your login credentials and try again." & vbNewLine & Err.Number & ": " & Err.Description Case Else MsgBox "Error encountered while sending email." & vbNewLine & Err.Number & ": " & Err.Description End Select Resume Exit_Err End Sub
@shaileshsatam7527
@shaileshsatam7527 4 жыл бұрын
how to add Email signature in same macro
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Interesting question. Will work on this idea. Off the cuff, you need to add the path to your signature file in Outlook.
@CarlosJimenez-pb6dq
@CarlosJimenez-pb6dq 3 жыл бұрын
Thanks!
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Welcome!
@darshpremchandani6201
@darshpremchandani6201 2 жыл бұрын
Thankyou Sir
@Exceltrainingvideos
@Exceltrainingvideos 2 жыл бұрын
Welcome!
@mohdwaris9360
@mohdwaris9360 4 жыл бұрын
Sir kya function se kisi dusre cell men data type kar sakte hai
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Yes.
@MariaKoliandri
@MariaKoliandri 3 жыл бұрын
Very very helpful. Thank you!!!! I need to attach a zip file also ... can you help me pls
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Glad it helped.
@gunindradas8042
@gunindradas8042 4 жыл бұрын
Sir how I can do this process by using Gmail? Please upload a video
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
This link will help: www.exceltrainingvideos.com/send-email-using-gmail-with-excel-vba/
@lu-ims-webinar4501
@lu-ims-webinar4501 4 жыл бұрын
pl. help me urgently
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Read the description accompanying the video carefully.
@kuntalbaidya1077
@kuntalbaidya1077 2 жыл бұрын
please sir
@mohdwaris9360
@mohdwaris9360 4 жыл бұрын
Aur iska code kya hai bataye
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Refer to the description.
@mohdwaris9360
@mohdwaris9360 4 жыл бұрын
Jaise kisi cell men =function("data"A1) is trah se likhne par A1 cell men data chala jaye jab ki ye formula kisi dusri cell jaise C2 men likha jayen
@NitinPanchalVlogs
@NitinPanchalVlogs 4 жыл бұрын
Hello sir All coding is perfect +++ in body msg how can add small chart, table (every table is different) depends user productivity n quality please help me sir
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Convert the charts to image and insert them into the body as 'img'. This VBA tutorial will guide: www.exceltrainingvideos.com/tag/convert-excel-charts-to-images-automatically-with-vba/
@hcssharma6150
@hcssharma6150 4 жыл бұрын
Bery good sir Please sir mail me vba code
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Can you kindly read the description accompanying the video?
@srivadana503
@srivadana503 Жыл бұрын
Hey, this is a great tutorial. But what do we do if we are to send different emails to different customers. Like Client001 has a different email body and different subject., so are the different clients. How can we customize the code?
@trik3002
@trik3002 Жыл бұрын
Simply make an individual column of subject and mail body. This way u can send different mail to different client with different subject and mail body. I myself have prepared that way and mailed 700 clients yesterday only.
@seetharamas7778
@seetharamas7778 4 жыл бұрын
Sir, my mail is outlook 365 and is configured to Microsoft Mail application and not Outlook 2007. When I run the macro the mails are shown in Outbox of outlook 2007 and not sent. The macro is not picking Mircrosoft Mail instead it picks outlook 2007. I cannot configure outlook 2007. Pls help in sending mails using outlook 365.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Did you activate the Outlook Object Library?
@seetharamas7778
@seetharamas7778 4 жыл бұрын
Sir, microsoft outlook 12.0 object library is already activated but still not working
@controllerofexaminations3095
@controllerofexaminations3095 2 жыл бұрын
respected sir please make a video mail merger multiple files with winword also. i am waiting for this
@Exceltrainingvideos
@Exceltrainingvideos 2 жыл бұрын
www.exceltrainingvideos.com/using-excel-data-for-mail-merge-in-word/
@lifetache-universe
@lifetache-universe 2 жыл бұрын
Can we do the same in outlook 365office
@deepshah3344
@deepshah3344 9 ай бұрын
In my library list Microsoft Outlook library is not show
@wolfenstein6288
@wolfenstein6288 2 жыл бұрын
Dear Sir, can i put my questions here? 1) Can we add multiple file path in one column? 2) can we add multiple emails in CC?
@linleysteve6855
@linleysteve6855 Жыл бұрын
Thanks if you have the updated version please
@nileshkalantri1413
@nileshkalantri1413 Жыл бұрын
Can we use this for other app than outlook?
@sushilmishra91
@sushilmishra91 2 жыл бұрын
Hello sir , thanks for this video But I don't want display screen in last .. I want to send directly all mails I have tried many times but I'm help less. Please guide me
@Exceltrainingvideos
@Exceltrainingvideos 2 жыл бұрын
.Visible=False
@amiraziminia5270
@amiraziminia5270 3 жыл бұрын
Great tutorial. I am getting a runtime error "287" message with "application-defined or object-defined error" messages. Debug indicates the ".Send" command. Any help is appreciated.
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Most probably you forgot to activate a few references: From Tools --> References activate 1. Microsoft HTML Object Library 2. Microsoft Internet Controls
@amiraziminia5270
@amiraziminia5270 3 жыл бұрын
@@Exceltrainingvideos Thanks for the reply. I do have those references activated but I am still getting the same error message.
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
@@amiraziminia5270 Is there an apostrophe before send? You need to delete it.
@amiraziminia5270
@amiraziminia5270 3 жыл бұрын
@@Exceltrainingvideos The apostrophe is before ".display". There is nothing before .Send.
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
@@amiraziminia5270 Can you share the code in the comments section?
@anil.kashyap9
@anil.kashyap9 3 жыл бұрын
Dinesh sir i want to send multiple mails with multiple attachements but body lines data should be in html with signtaure graphic _please share the code like to replace
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
I don't have the code for your query.
@giftjiratcom
@giftjiratcom 3 жыл бұрын
DD d
@jnnrvnssaargonza6053
@jnnrvnssaargonza6053 3 жыл бұрын
Hi Sir, thank you so much for this tutorial, really helps! Just wanted to ask, what if the file I need to attach isn’t constant, I mean every week the name of the file changes, how do we put this?
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Try this link: kzbin.info/www/bejne/rZu2p6KNnMdogs0
@ayushsah67
@ayushsah67 2 жыл бұрын
@@Exceltrainingvideos sir, I have similar query as above. But the link that you shared doesn't cover for attachment issue. Could you please help.
@ahsmbs
@ahsmbs 3 жыл бұрын
Hi, can i send two attachments? Just try with semi colon, wont work
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Did you read the description accompanying the Excel VBA training tutorial on how to send emails to multiple persons with multiple attachments?
@nehaghavnalkar3822
@nehaghavnalkar3822 2 жыл бұрын
Hello Sir, I am having an outlook limit of 10mb..then also while executing the code it's throwing an error as "attachment size is exceeding the limit".kindly help over this issue of possible
@anbualagan4549
@anbualagan4549 2 жыл бұрын
Dear sir, Thanks so much for this video 📹 💗. I learned new things from you. Thanks so much your time.
@4._.9
@4._.9 Жыл бұрын
Hi Sir: Can demonstrate the same example using Power Automate? Thanks.
@shantoru333
@shantoru333 2 жыл бұрын
This is good but the sending emails can't be shown in 'SENT' folder of my email.
@sahebraophalke6986
@sahebraophalke6986 3 жыл бұрын
नमस्ते सर, एकही मेल मे से 1 से जादा फाईल 1 से जादा आदमीको कैसे भेजते है इसके बारेमे आपणे जो छोटासा xl vba अँप्लिकेशन बनाया वह बहुतही usefull है, ऊस अँप्लिकेशन मे ईमेल भेजनेके पहले एक alert msg like:- "You want to send mail" कैसे बताये इसके बारेमे कृपया कोडिंग बताये,,,, धान्यवाद
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
सारी रामायण पढ़ने के बाद पूछ रहे हो सीता कौन है
@sahebraophalke6986
@sahebraophalke6986 3 жыл бұрын
Sir, मेरा कहनेका मतलब यह है की, जो अँप्लिकेशन आपणे बनाया है उसमे मेल सेंड बटनपर क्लीक करनेसे मेल जाता है, बटन पर क्लीक करतेही मेल चला जयेगा, असे हम कुछ नाही कर शकते, लेकिन बटनपर क्लीक करने के बाद यह msg डिस्प्ले हो की "You want to send the mail". Yes or No, तो इससे अगर मेल कुछ कारणकी वजहसे नही भेजना है तो ऊस मेल को हम रोक शकते है,,,,,, धन्यवाद
@hakinkunmiyusuf4685
@hakinkunmiyusuf4685 3 жыл бұрын
Hello Dinesh. I am having issue with this particular combination If cell.Value Like "?*@?*.?*" And _ Application.WorksheetFunction.CountA(rng) GREATER THAN 0 Then It's not allowing me to run the Marco.
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Replace GREATER THAN with the symbol '>'
@salsabilzaghdoudi3625
@salsabilzaghdoudi3625 4 жыл бұрын
Hello, I am using the below code to send mail to multiple persons based on listbox selection: Private Sub Valider_Click() 'choisir les personnes For i = 0 To Me.ListBox1.ListCount - 1 If Me.ListBox1.Selected(i) = True Then temp = temp & Me.ListBox1.list(i) & " " Next i SelectDestChoice = Me.ListBox1.ListIndex Unload Me End Sub with Public SelectDestChoice 'allows me to slect the recipients My problem is that this code choses random recipents and only one person not those who I have selected from my listbox, can you identify the error please ?
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Noted
@prathameshsawaratkar6771
@prathameshsawaratkar6771 4 жыл бұрын
Hi Sir, I wanted to send mail to more than 10 mail ID's. what will be command.. .to= .......... can we set range for Mail ID's... please help
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Isn't that what you learnt just now? You may like to view this video: kzbin.info/www/bejne/rZu2p6KNnMdogs0
@pritishjena1754
@pritishjena1754 2 жыл бұрын
Why is it working for two cells only?
@Exceltrainingvideos
@Exceltrainingvideos 2 жыл бұрын
The main cause can be your code. This link will help: www.exceltrainingvideos.com/send-emails-to-multiple-persons-with-multiple-attachments/ The code is also given in the description accompanying the video.
@pritishjena1754
@pritishjena1754 2 жыл бұрын
@@Exceltrainingvideos sir i have tried that but still no change
@manuk6213
@manuk6213 4 жыл бұрын
Hi Dinesh, I am getting below error:Run time error 429ActiveX component can't create objectSet OutApp = CreateObject("Outlook.Application")Pls let me how to fix this.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Check your code here: www.exceltrainingvideos.com/send-emails-to-multiple-persons-with-multiple-attachments/ Did you activate the Outlook library?
VBA Unleashed: Send Customized Emails in One Line
11:10
Excel Macro Mastery
Рет қаралды 10 М.
哈莉奎因怎么变骷髅了#小丑 #shorts
00:19
好人小丑
Рет қаралды 53 МЛН
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 98 МЛН
Worst flight ever
00:55
Adam W
Рет қаралды 26 МЛН
Automated Multiple Emails with Multiple Attachments and "From" option
11:20
PK: An Excel Expert
Рет қаралды 73 М.
Send Multiple Emails From Excel
10:09
Excel Macro Mania
Рет қаралды 77 М.
Excel VBA Macro: Send Multiple Emails (with Multiple Attachments)
12:09
Ex-Google Recruiter Reveals 8 Secrets Recruiters Won’t Tell You
13:57
Send Emails from Excel That Capture Data From Your Worksheet
13:27
Officeinstructor
Рет қаралды 36 М.
How To Automatically Send Customized Emails With Attachments Using Excel Macros
19:40
哈莉奎因怎么变骷髅了#小丑 #shorts
00:19
好人小丑
Рет қаралды 53 МЛН