How to tell where a mailtiem ended up after the rules wizard runs

  • Thread starter Thread starter Dale Wagner
  • Start date Start date
D

Dale Wagner

In VBA I get a notification of a new mailitem and I can tell it is in the
inbox because the mailitem.parent="Inbox". In the code, I put in a pause
(while,doevents) and then query the .parent property. I know the item is
now in another folder, I can browse for it in outlook. The code continues
after the pause and the .parent still equals "Inbox".
Can anyone give me some code to find out where a mailitem finished up?

regards
list1@dpw(ihatespam).net.au
 
There is no way to find out. The item that you are referencing is still
pointing to the old message, which is now deleted and only exists in memory.
In case of a PST message store, you can use the fact that the entry ids do
not change after the message is moved, so you can store its entry id and
then reopen ithe message using Namespace.GetItemFromID().

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top