Email

A

Alvin Hansen

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
 
S

sebastienm

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top