» Mail the Activeworkbook using VBA in Microsoft Excel
VBA macro tip contributed by Ron de Bruin, Microsoft MVP - Excel
ActiveWorkbook.SendMail "email@example.com", _
"This is the Subject line"
If you want to mail the workbook where the code is placed you must use the following line:
ThisWorkbook.SendMail "firstname.lastname@example.org", _
Note: It doesn't have to be the active workbook used at that time.