PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
How to tell where a mailtiem ended up after the rules wizard runs
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
How to tell where a mailtiem ended up after the rules wizard runs
![]() |
How to tell where a mailtiem ended up after the rules wizard runs |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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 "Dale Wagner" <dpwpro@trump.net.au> wrote in message news:ezBKGqZfDHA.3464@TK2MSFTNGP11.phx.gbl... > 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 > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

