Sub Mail_workbook() ActiveWorkbook.SendMail "ron@debruin.nl", _ "This is the Subject line" End Sub
If you want to mail the workbook where the code is placed you must use the following line:
ThisWorkbook.SendMail "ron@debruin.nl", _
Note: It doesn't have to be the active workbook used at that time.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.
"First : comment,
If i use the line code you write for Mail the Activeworkbook using VBA in Microsoft Excel :
Sub Mail_workbook()
ActiveWorkbook.SendMail ""b.mathellier@crittiaa.com""
End Sub
VBA accept :
ActiveWorkbook.SendMail (""b.mathellier@crittiaa.com""),
but not
ActiveWorkbook.SendMail ""b.mathellier@crittiaa.com""
Second : Question for you
When i write :
Sub Mail_workbook()
ActiveWorkbook.SendMail (""b.mathellier@crittiaa.com""), _
""This is the Subject line""
End Sub
the messge ""erroe 1004"" is return !
Do you have any solution ?
I use : Excel 2000, outlook express 6.0
Thank you for your Help
Bruno MATHELLIER "
I'm currently using this with Groupwise, and it works fine, but I can't figure out how to list multiple recipients.
"You can change the mail program in your
browser.
Tools>Internetoptions>Programs
Not all mailprograms can work with SendMail, remember that."
I believe it will be sent via Outlook - the configuration will be based on the default account
Where are must be mailserver name near this things? How could Exel know where to send through?