Lef_pl
09-29-2021, 02:52 AM
Hello,
If you could kindly assist me with below matter:
I have a simple macro that runs on "Item send" event.
It works very well but it also triggers when users send invitations for meetings.
Could you suggest how can I check before sending if the item is email or meeting?
Please see my code below.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim question As String
Dim strSubj As String
strSubj = Item.subject
Item.Display
If InStr(Item.subject, "[Confidential]") > 0 Then
Exit Sub
Else '
question = MsgBox("Please do something", , "Attention")
MENU.SHOW
Cancel = True
End If
End Sub
Kind Regards,
Lef
If you could kindly assist me with below matter:
I have a simple macro that runs on "Item send" event.
It works very well but it also triggers when users send invitations for meetings.
Could you suggest how can I check before sending if the item is email or meeting?
Please see my code below.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim question As String
Dim strSubj As String
strSubj = Item.subject
Item.Display
If InStr(Item.subject, "[Confidential]") > 0 Then
Exit Sub
Else '
question = MsgBox("Please do something", , "Attention")
MENU.SHOW
Cancel = True
End If
End Sub
Kind Regards,
Lef