Globalforester
Member
- Outlook version
- Outlook 2010 64 bit
- Email Account
- IMAP
I have ItemAdd macro in ThisOutlookSession, which monitors a folder that is receiving emails based on a rule running on the inbox. The ItemAdd has code that a) edits the incoming email and saves it, b) creates an automated reply based on a template and c) triggers another macro in a Module which saves details to Excel.
This all works perfectly if one email comes in and is processed before another one arrives. The issue is that if more than one email arrives almost simultaneously, the first email is processed but the other ones are not (my work around is to drag the unprocessed ones to trash and then back to the relevant folder).
It would be neat to solve this issue.
For information, I have used error catching:
Private Sub objItems_ItemAdd(ByVal Item As Object)
On Error GoTo objItemsErr
......run code which also call another macro in a module
Exit Sub
objItemsErr:
MsgBox "objItemsError #: " & Err.Number & vbCrLf & Err.Description
End Sub
Any thoughts/help would be appreciated?
This all works perfectly if one email comes in and is processed before another one arrives. The issue is that if more than one email arrives almost simultaneously, the first email is processed but the other ones are not (my work around is to drag the unprocessed ones to trash and then back to the relevant folder).
It would be neat to solve this issue.
For information, I have used error catching:
Private Sub objItems_ItemAdd(ByVal Item As Object)
On Error GoTo objItemsErr
......run code which also call another macro in a module
Exit Sub
objItemsErr:
MsgBox "objItemsError #: " & Err.Number & vbCrLf & Err.Description
End Sub
Any thoughts/help would be appreciated?