ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to send e-mail from excel (https://www.excelbanter.com/excel-programming/274990-how-send-e-mail-excel.html)

Barmaley

how to send e-mail from excel
 
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



steve

how to send e-mail from excel
 
Barmaley,

Go to this site and learn all about email
http://www.rondebruin.nl/sendmail.htm

--
sb
"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





Don Guillett[_4_]

how to send e-mail from excel
 
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





Ron de Bruin

how to send e-mail from excel
 
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










All times are GMT +1. The time now is 09:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com