Link to home
Start Free TrialLog in
Avatar of Hitesh Manglani
Hitesh ManglaniFlag for India

asked on

How to track details of mails removed from a folder -Outlook

Hi experts,

I am trying to get details of the mails that are moved from a particular folder. The problem is that Outlook provides a ItemRemove event but does not provide details of the removed item. Is there any workaround? Let me know if i am not clear.
Avatar of David Lee
David Lee
Flag of United States of America image

Hi, hiteshgoldeneye.

What version of Outlook are you using?  Have you considered using the Selected items of the ActiveExplorer?
Avatar of Hitesh Manglani

ASKER

I am using Outlook 2003, I am not aware of selected items of the ActiveExplorer
Never mind Selection.  Bad idea.  ItemRemove fires after the item has been moved, so Selection returns the item selected after the move.  I don't think there is a good solution for this in Outlook 2003.  Outlook 2007 adds a new event for folders called BeforeItemMove that solves this problem.  It passes the item being moved.  
HI thnx for your reply, does that mean there is no work around for Outlook 2003? Also BlueDevilFan u had helped me in an earlier question
https://www.experts-exchange.com/questions/24383963/Outlook-Item-Add-Event-for-mutliple-items.html
i need some help on it, if possible pls spare ur time, if you want me to open a new question for the same, pls let me know.
I had found one software in the following link
http://www.aptrio.com/Development/ActiveX/outlook-plus-events-11011.html
but I am unable to download the same :(
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi BludeDevilFan,. thnx for our reply, you had mentioned
>>Outlook 2007 adds a new event for folders called BeforeItemMove that solves this problem.  It passes the item being moved.  

What if multiple items are moved, is a collection passed in this case?
The event is called once for each item moved.
thanks BlueDevilFan just a final comment before closing this question
you mentioned
>>You could always write code to enumerate all the messages in a folder when the folder is first opened and then compare the contents of the folder after an ItemRemove event to see which items are missing.  That will require a fair amount of effort to write and use.

in this case i will not know if the messages have been moved or deleted, since deleting is not to be considered. Am i right?

Also upgrading to Outlook 2007 is not on the cards as of now.
"i will not know if the messages have been moved or deleted"
Correct.