babycody
Well-known Member
- Joined
- Jul 8, 2003
- Messages
- 1,395
Nimrod provided the following code in another post:
I was curious if it were possible to add a few more features to the code?
1. Currently it creates an email message before saving. Can code be added to have it create an email apon closing also?
2. Can Cc and Bcc be added to this?
3. Can a subject line be added?
4. I am most curious as to the possibility of bypassing the popup that ask send or don't send. Can code be added so that the email is sent without any confirmation?
5. How would I go about putting multiple email addresses into the main, Cc, and Bcc?
Thanks for any time you give toward this. I have viewed several post on the subject of emailing. I have followed a lot of links, but haven't found one that incompassed all aspects listed above. I tried to incorporate bits of code into one with no success. Just a VBA novice.
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveWorkbook.SendMail Recipients:="EmailAddressHere"
End Sub
1. Currently it creates an email message before saving. Can code be added to have it create an email apon closing also?
2. Can Cc and Bcc be added to this?
3. Can a subject line be added?
4. I am most curious as to the possibility of bypassing the popup that ask send or don't send. Can code be added so that the email is sent without any confirmation?
5. How would I go about putting multiple email addresses into the main, Cc, and Bcc?
Thanks for any time you give toward this. I have viewed several post on the subject of emailing. I have followed a lot of links, but haven't found one that incompassed all aspects listed above. I tried to incorporate bits of code into one with no success. Just a VBA novice.