F
Freudi
Since Outlook2002 there has to be a "BeforeDelete" Event
for all items. But it doesent fire ?
I have that in my Code
Public WithEvents myOlItems As Outlook.Items
Public Sub Initialize_handler()
Set myOlItems = GetNamespace("MAPI").GetDefaultFolder
(olFolderCalendar).Items
End Sub
Private Sub Application_Startup()
Call Initialize_handler
End Sub
Private Sub myOlItems_ItemAdd(ByVal item As Object)
MsgBox("Add OK") ' That works
End Sub
Private Sub myOlItems_BeforeDelete(ByVal item As Object,
Cancel As Boolean)
MsgBox("Add OK") ' That don't works
End Sub
for all items. But it doesent fire ?
I have that in my Code
Public WithEvents myOlItems As Outlook.Items
Public Sub Initialize_handler()
Set myOlItems = GetNamespace("MAPI").GetDefaultFolder
(olFolderCalendar).Items
End Sub
Private Sub Application_Startup()
Call Initialize_handler
End Sub
Private Sub myOlItems_ItemAdd(ByVal item As Object)
MsgBox("Add OK") ' That works
End Sub
Private Sub myOlItems_BeforeDelete(ByVal item As Object,
Cancel As Boolean)
MsgBox("Add OK") ' That don't works
End Sub