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

Number11

Member
Local time
Today, 11:29
Joined
Jan 29, 2020
Messages
344
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, 06:29
Joined
Apr 9, 2015
Messages
3,891
if .Attachments.count = 0 then exit sub
 

Users who are viewing this thread

Top Bottom