ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Email (https://www.excelbanter.com/excel-programming/312056-email.html)

Alvin Hansen[_2_]

Email
 
Hi
I use this to send a email in excel
With objMail
.To = addee
.Subject = "Booking"
.HTMLBody = msg

.Display

.Send

End With
Its allright but there come a warning from outlook thats also allright but
if i here cancel the email the system goes down , how can i get arounf this?
MAybe a If -else -then or something like that?

Alvin


sebastienm

Email
 
Hi Alvin,
i haven't looked at mailing or mailing objects but i would try to surround
the code with DisplayAlerts

application.DisplayAlerts=False
With objMail
.To = addee
.Subject = "Booking"
.HTMLBody = msg
.Display
.Send
End With
application.DisplayAlerts=True

"Alvin Hansen" wrote:

Hi
I use this to send a email in excel
With objMail
.To = addee
.Subject = "Booking"
.HTMLBody = msg

.Display

.Send

End With
Its allright but there come a warning from outlook thats also allright but
if i here cancel the email the system goes down , how can i get arounf this?
MAybe a If -else -then or something like that?

Alvin


Ron de Bruin

Email
 
Hi Alvin

Look here
http://www.rondebruin.nl/mail/prevent.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Alvin Hansen" wrote in message ...
Hi
I use this to send a email in excel
With objMail
.To = addee
.Subject = "Booking"
.HTMLBody = msg

.Display

.Send

End With
Its allright but there come a warning from outlook thats also allright but
if i here cancel the email the system goes down , how can i get arounf this?
MAybe a If -else -then or something like that?

Alvin





All times are GMT +1. The time now is 05:28 PM.

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