J
joebob
I added the code below to fire whenever I receive an item. I then
compiled, closed Outlook, and sent 6 messages to myself from outside
using different addresses. I then opened Outlook and downloaded the 6
messages but MsgBox only fired twice. Is there a mechanism that will
successfully capture every incoming item? This is for O2K SP3 CW mode.
Thanks
Private WithEvents olInboxItems As Items
Private Sub Application_Startup()
Dim objNS As NameSpace
Set objNS = Application.GetNamespace("MAPI")
Set olInboxItems = objNS.GetDefaultFolder(olFolderInbox).Items
Set objNS = Nothing
End Sub
Private Sub olInboxItems_ItemAdd(ByVal Item As Object)
If Item.Class = olMail Then
MsgBox ""
End If
End Sub
compiled, closed Outlook, and sent 6 messages to myself from outside
using different addresses. I then opened Outlook and downloaded the 6
messages but MsgBox only fired twice. Is there a mechanism that will
successfully capture every incoming item? This is for O2K SP3 CW mode.
Thanks
Private WithEvents olInboxItems As Items
Private Sub Application_Startup()
Dim objNS As NameSpace
Set objNS = Application.GetNamespace("MAPI")
Set olInboxItems = objNS.GetDefaultFolder(olFolderInbox).Items
Set objNS = Nothing
End Sub
Private Sub olInboxItems_ItemAdd(ByVal Item As Object)
If Item.Class = olMail Then
MsgBox ""
End If
End Sub