Use this then
Sub test()
On Error Resume Next
ActiveWorkbook.SendMail ", _
"This is the Subject line"
On Error GoTo 0
End Sub
--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl
"Barmaley" wrote in message ...
Thank you, that's pretty much what I was looking for.
this is the code from the website:Sub Mail_workbook()
ActiveWorkbook.SendMail ", _
"This is the Subject line"
End Subthere was only one problem, when it asks me "A program is trying to
automatically send e-mail on your behalf. Do you want to allow this?" and I
click "No" it gives me runtime error.So I added error handling parthere is
my result:Sub Mail_workbook()On Error GoTo ErrHandler
ActiveWorkbook.SendMail ", _ "This is
the Subject line"
ErrHandler:End Sub
I thought I'd post my findings, it might help someone
Thanks again
"Don Guillett" wrote in message
...
http://www.rondebruin.nl/
"Barmaley" wrote in message
...
I need to be able to click on the button in Excel workbook resulting
e-mail
sent with address and subject line are filled up
and attach active workbook to e-mail. after that e-mail is sent without
any
other action. (in another scenario client will need to click Send
button)
Your help is greatly appretiated