PDA

View Full Version : Asking confirmation user before deleting meeting or appointment in a shared calendar



Zeyocse
12-08-2017, 03:04 AM
Hello everyone,

I'm looking for help to write a vba macro in order to add a msg box every time an user try to delete a meeting or an appointment in two specific shared calendars. The msg box would ask "are you sure you want to delete this item?" and would cancel the user action or not.

If it could do the same when displacing an item it would be perfect! Any idea how I could do that?
Many thanks in advance!

Zey.

SamT
12-08-2017, 09:25 AM
Look into Outlook.MeetingItem.BeforeDelete and maybe? Outlook.MeetingItem.Move

I don't do Outlook, but possibly something like?

Calendar Modules Code
Private Sub BeforeDelete(Item As Object, Cancel As Boolean)
If Item is MeetingItem then
MsgBox "R U Sure?"
If MsgBoxCanceled then Cancel = True
ElseIF Item is Appointment then
'Same as above
End If
End Sub