Thank you this is fantastic. I have tried many different code samples and every one failed at some point with a strange error. This one just works. Thank you very much. I also enabled Less Secure Access on my gmail. I found it on another sites instructions. I don't know if it is needed, but I know that it works. Thanks again.
hi just wanted to know if we write a software package with excel/ access for the background processing; do we infringe any terms with mocrosoft? also, what could be the limitations of writing an accounting software with excel/access as background processing instead of using c, java etc?
Is there a way to do this from within a Worksheet you just saved? Example I want the attachment to be the current path.... current spreadsheet.... and a name I have created. I have all the path and names DIM as I am supposed to It just won't allow it for some reason? I even save the file name before I try the send email section.
Hi Brett, thanks for the Top Tutorials. Is it possible to show a progress bar while the email is being sent so the end user knows something is happening? If this can be done can you offer some help?
Subscribed, awesome channel Brett! Automation is key in a busy world and these videos are very helpful. I've already got email automation with the Outlook object library working but it's cool to see you can do this without Outlook. Thanks :)
Hey Don, I keep getting the "The transport failed to connect to the server" error. Any thoughts on what it may be. I've tried changing to port number to 465 and 587, but I still got the same error. Regards,
Sorry, I'm really new to VBA... In excel i have a colum with emailadresses and next to it a colum with a personalized text. I want to send a the personalized text to the correct emailadress. How do i do that? Thanks in advance
hey, thanks for the straight to the point video. Can I ask what the Config(cdoSMTPServerPort) = 25 does? if you could explain what the 25 is please. I have put together a code which highlights due dates X days in advance and speak out the notification msg. I would like to also use your code to send emails to those responsible for the tasks/due dates. Could you do a video on such a thing please ? :) Please and thank you.
Thank you for your video! However I have one problem. When i run the code I receive the following error: The transport failed to connect to the server. Could you please help me on this! Thank you
The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available Let me know what to do
I am getting an error on this part of your your code here Config(cdoSMTPServer) = “smtp.gmail.com” error says, Run-time error '424': Object required Any Suggestions?
Great presentation!!! I exactly copied your script, ran it, and unfortunately, I got this Run-time error ‘3265’: "Item cannot be found in the collection corresponding to the requested name or ordinal." Config(cdoSMTPServer) = "SMTP.gmail.com" Config(cdoSMTPport) = 25 May you please assist on what cdoSMTPport to use? Thank you.
Not sure if you respond to messages on this video. I'm helping my girl organize her client list in excel and one of the things we would like to do is to send a mass promotional email out to her clients emails (more than one client) via gmail. The idea would be to have a field in excel where we write the message then hit send and it would populate the receiver email from the database and send it out individually.
Mailchimp allows 2k subscribers, 12k emails a month for free, might be worth checking out. Probably allows excel / csv upload. Otherwise you could use the solution in the video but looping thru a list sending one at a time. This might work: (didnt test) Mail.From = Config(cdoSendUserName) Mail.Subject = “Subject from VBA” Mail.HTMLBody = “Body from VBA” Dim i as integer Dim lastrow as integer: lastrow = activesheet.range("A100000").end(xlup).row for i = 2 to lastrow Mail.To = “your_recipient@whereever.com” Mail.Send application.statusbar = i & " of " & lastrow doevents next i
I have 2 questions: 1. How to display email before sending it ? It is important as I want to make adjustments and then click "send". 2. How to attach current open excel from which macro is written and which does not need to be saved after being emailed?
I have watched many video all they lack something,why would u use all that steps to send email writing down all the code every time? so poor I am sorry why not sending direct from your email,I actual want to send group email just click without going those 100 steps
Thanks for posting this. I think the port may have changed since you originally posted this. I switched mine from 25 to 465 and it fixed my problem.
Thank you this is fantastic. I have tried many different code samples and every one failed at some point with a strange error. This one just works. Thank you very much. I also enabled Less Secure Access on my gmail. I found it on another sites instructions. I don't know if it is needed, but I know that it works. Thanks again.
hi just wanted to know if we write a software package with excel/ access for the background processing; do we infringe any terms with mocrosoft?
also, what could be the limitations of writing an accounting software with excel/access as background processing instead of using c, java etc?
Is there a way to do this from within a Worksheet you just saved?
Example I want the attachment to be the current path.... current spreadsheet.... and a name I have created. I have all the path and names DIM as I am supposed to It just won't allow it for some reason? I even save the file name before I try the send email section.
Hi,
I want to ask that can we send data from excel sheets in same way they are formatted ? or the few range of cells ?
Hi Brett, thanks for the Top Tutorials. Is it possible to show a progress bar while the email is being sent so the end user knows something is happening? If this can be done can you offer some help?
Love your videos Brett! Thank you!!
hi, I would like to attach the last date modified file (automatically), how can I do that? thank in advance!!
DontFretBrett, I am getting an error about COM+ not being installed. Is that an Excel add on that I need in order for this to work?
Subscribed, awesome channel Brett! Automation is key in a busy world and these videos are very helpful. I've already got email automation with the Outlook object library working but it's cool to see you can do this without Outlook. Thanks :)
Hey Don,
I keep getting the "The transport failed to connect to the server" error. Any thoughts on what it may be. I've tried changing to port number to 465 and 587, but I still got the same error.
Regards,
Hi Brett I am trying the same but it is showing 3265 runtime error. Can you please help me on this
Can you tell me how to send the particular sheet where the button has been place.
I'm assuming the signature line setup through gmail will not be automatically included, but will need to be coded in? Is that correct?
i have a error.
Run-time '424' Object required
it stop in: config(cdoSMTPserver)="smtp.gmail.com"
WHY?
Sorry, I'm really new to VBA...
In excel i have a colum with emailadresses and next to it a colum with a personalized text. I want to send a the personalized text to the correct emailadress. How do i do that?
Thanks in advance
I had did what u showed in the video but i did't get mail.... This code working correct but i am not received mail.
Pls reply asap . Thank U
I just did it on windows 7 64 bit .. it works PERFECTLY
Works perfectly. Thanks veru appreciate
Thank you Sir, very powerful Coding
Can I ask how to insert selected range of cell to the content of gmail?? (not as attachement)
this is great. Is there a way to combine this with a mail merge?
Dude... 10x .. I love you :)
hey, thanks for the straight to the point video.
Can I ask what the Config(cdoSMTPServerPort) = 25 does?
if you could explain what the 25 is please.
I have put together a code which highlights due dates X days in advance and speak out the notification msg. I would like to also use your code to send emails to those responsible for the tasks/due dates.
Could you do a video on such a thing please ? :)
Please and thank you.
Run time error object 424 coming. In line Set Config = Mail.Configuration, what to do?
It says "Automation Error". What to do!
Thanks, nice tool...
thank you for your video
i an getting error 91 and Set Config = mail.Configuration is getting highlighted. please help me. Thanks
Hello Good day Thanks for the video , I catered the code but I received message object required , how to solve ?
Your vedio is so helpful!! Hope that you can upload more vba teaching vedio!!
Which stmp port did you use...?! XD
sorry?
STMP Port...
Don, very helpful video. Was looking for an easy way to do this, thanks. Mind if I ask what screen capture tool you use?
Did this work?
Thank you for your video! However I have one problem. When i run the code I receive the following error: The transport failed to connect to the server. Could you please help me on this! Thank you
I have the same : error: The transport failed to connect to the server.
thanks you
Is that actually VBA? This sub will not go passed the first line without an error, starting with Dim Mail as New Mail.
I am getting this error -2147220975 - can you help?
The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available
Let me know what to do
It could be that you are using 2-step verification on your Google Account. If yes, you will need to use an App Password.
I am getting an error on this part of your your code here
Config(cdoSMTPServer) = “smtp.gmail.com”
error says,
Run-time error '424':
Object required
Any Suggestions?
Daniel Kimbril
Hii did you find solutions
Even I got same error
@@dhillandhillan9121 Change those quote marks, they are different from what VBA uses
Great presentation!!!
I exactly copied your script, ran it, and unfortunately, I got this Run-time error ‘3265’: "Item cannot be found in the collection corresponding to the requested name or ordinal."
Config(cdoSMTPServer) = "SMTP.gmail.com"
Config(cdoSMTPport) = 25
May you please assist on what cdoSMTPport to use? Thank you.
to those who are getting server rejection errors, try logging out of your gmail accounts before running the code and use smtp port 465.
thanks. ive been figuring it out for too long y i cant send my emails.. y is it that port 25 not working right now?
Hi!...thank you very much for this! it was successful!
Not working for me, could you give more detail?
Mine did't work, I did it exactly as you did.
Thank you it is a very nice video. Can you please help me I'm trying to do the same with Outlook I will appreciate your help
It showed me an error saying "Object required." I did the exact same work, though. What should I do?
What line did it highlight
DontFretBrett Same thing for me. It highlighted Config (cdoSMTPServer) = "smtp.gmail.com"
What about doing the same for yahoo ?
Any server Info ?
Eslam Omar Keep getting Run time error 3265
Not sure if you respond to messages on this video. I'm helping my girl organize her client list in excel and one of the things we would like to do is to send a mass promotional email out to her clients emails (more than one client) via gmail. The idea would be to have a field in excel where we write the message then hit send and it would populate the receiver email from the database and send it out individually.
Mailchimp allows 2k subscribers, 12k emails a month for free, might be worth checking out. Probably allows excel / csv upload. Otherwise you could use the solution in the video but looping thru a list sending one at a time. This might work: (didnt test)
Mail.From = Config(cdoSendUserName)
Mail.Subject = “Subject from VBA”
Mail.HTMLBody = “Body from VBA”
Dim i as integer
Dim lastrow as integer: lastrow = activesheet.range("A100000").end(xlup).row
for i = 2 to lastrow
Mail.To = “your_recipient@whereever.com”
Mail.Send
application.statusbar = i & " of " & lastrow
doevents
next i
oops Mail.To = activesheet.range("a" & i).value (or whatever column the email is in)
the message could not be sent to the smtp sever....this error is fessing
same here @
DontFretBrett please help
Hi guys if somebody still has a problem with the smtp ports try using 465 instead of 25 (it works for me)
+Taki241 465 worked! Thanx a lot!
Correct Daniel, the signature wouldn't get automatically appended
Thank you for the video and the reply. Greatly appreciated. Keep up the good work.
I have 2 questions:
1. How to display email before sending it ? It is important as I want to make adjustments and then click "send".
2. How to attach current open excel from which macro is written and which does not need to be saved after being emailed?
I'm not sure this is correct, but try (Mail.display) before (Mail.send). Worth a try.
I too would like to do this. Did you find a way? If so please tell. Thanks
Run time error 13
Not possible anymore, google made the SMTP server available only for G Suite customers. But thanks for the code.
I have watched many video all they lack something,why would u use all that steps to send email writing down all the code every time? so poor I am sorry why not sending direct from your email,I actual want to send group email just click without going those 100 steps