Question Getting all new emails (ItemAdd)

ahstax

New member
Joined
Nov 27, 2013
Messages
4
Programming Experience
1-3
Hello,

i'd like to monitor a public OL2010 folder and put the incoming item into a dictionary. Everything ist fine with the following code, as far as only one email arrives at a time:


*************SNIP*************
Public Sub olInboxItems_ItemAdd(ByVal Item As Object) Handles olInboxItems.ItemAdd

dicMailItemsReceivedLive.Add(intMailItemsReceivedLiveRollingIndex, Item)

If intMailItemsReceivedLiveRollingIndex < 99 Then
intMailItemsReceivedLiveRollingIndex = +1
Else
intMailItemsReceivedLiveRollingIndex = 0
End If

End Sub
*************SNIP*************

The problem starts, if two or more emails (items) are comming up at the same time.

Could you please give me advice, how and what I should change?

Regards,
Andreas
 
Top Bottom