Answer the question
In order to leave comments, you need to log in
How to send email with attachment from Outlook using VBA?
Good afternoon.
Comrades, help with the decision of a question.
There is a VBA script that sends an email when an event occurs in the calendar. How to make it add an attachment from a specific directory?
Private Sub Application_Reminder(ByVal Item As Object)
Dim objMsg As MailItem
Set objMsg = Application.CreateItem(olMailItem)
If Item.MessageClass <> "IPM.Appointment" Then
Exit Sub
End If
If Item.Categories <> "Automated Email Sender" Then
Exit Sub
End If
objMsg.To = Item.Location
objMsg.Subject = Item.Subject
objMsg.Body = Item.Body
objMsg.Send
Set objMsg = Nothing
End Sub
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question