auto send email when meeting closes from a shared calendar only

RichardBa

New Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
#1
Hi,

I have a need to send an automatic email to the person that set up the meeting in Outlook when the meeting ends. It would be great if it also sent a copy to an administrator email as well. This is on a shared calendar only, so not sure how the outlook session needs to be set up?

So far I have the following...

Private Sub Application_Reminder(ByVal Item As Object)
Dim NewMail As MailItem
Dim objAtts As Recipients
Dim obj As Object
Dim strAddrs As String

If TypeOf Item Is AppointmentItem And Item.Recipients.Count Then
Set objAtts = Item.Recipients

'Extract the attendees who have accepted this meeting
For Each obj In objAtts
If obj.MeetingResponseStatus = olResponseAccepted Then
strAddrs = strAddrs & obj.Address
End If
Next

Set NewMail = Outlook.Application.CreateItem(olMailItem)
With NewMail
.To = strAddrs
.Subject = "Return notification - please arrange the return of loan item(s)"
.HTMLBody = "<HTML><BODY> When: " & Item.Start & " - " & Item.End & "</HTML></BODY>" & "<HTML><BODY>Where: " & Item.Location & "</HTML></BODY>" & "<HTML><BODY>Details: " & Item.Body & "</HTML></BODY>"
.Attachments.Add Item
.DeferredDeliveryTime = Item.End
.Display
End With
End If
End Sub

This creates an email, but at the start of the meeting and not the end, it also doesn't send it automatically as I would need to press the send button. I have only tested it on my local calendar and not a shared calendar.

Thanks in advance if you can help...

cheers
Richard
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
#2
There´s no event in Outlook that tells you when a meeting has ended. For a full automatic process you´d need to look at intervals into the calendar, find all meeting items, decide, which one has ended, and which of the ended ones hasn´t yet sent the email. That´s a lot of work for a beginner.

Maybe it´s an option for you to manually select a meeting in the calendar, then start the shown function manually. For that you´d just need to remove the Item As Object argument. Instead declare the variable in the second line this way::
Code:
Dim Item As Object
In order to set the variable to the currently selected item of a folder add this before the If Typeof line:
Code:
set item=application.activeexplorer.selection(1)
 

Similar threads

Top