Solved Sending email - stop if no attachments (1 Viewer)

Number11

Member
Local time
Today, 06:57
Joined
Jan 29, 2020
Messages
607
So i am using this code to send some reports exported from ms access, however i want to have a message box appear if the attachments are not added how do i do that ?

With OutMail
.Display
.To = ""
.CC = ""
.BCC = ""
.Subject = ""
.HTMLBody = strbody & "<br>" & .HTMLBody
.Attachments.Add "file location her"
.Send
 

Ranman256

Well-known member
Local time
Today, 02:57
Joined
Apr 9, 2015
Messages
4,339
if .Attachments.count = 0 then exit sub
 

Users who are viewing this thread

Top Bottom