How do I run a macro to have a Pop up window msg or Prompt only when I create a meeting from a specific Outlook Calendar (a shared calendar)?
Posted on 2014-07-29
Hi I want to run this macro in VBA outlook (see below) but only in a specific share calendar folder. How do I do that?
The macro works perfectly but as it is, it runs in every calendar that I have on my computer, and I want this prompt only to pop up when I send the meeting from a shared calendar.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim olkAppt As Outlook.AppointmentItem
If Item.Class = olMeetingRequest Then
Set olkAppt = Item.GetAssociatedAppointment(False)
If olkAppt.Categories = "" Then
If MsgBox("You didn't select a category. Do you still want to submit the meeting request?", vbOK, "Categorize Meeting Request") = vbOK Then
Cancel = True
Set olkAppt = Nothing