PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming How to tell where a mailtiem ended up after the rules wizard runs

Reply

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

 
Thread Tools Rate Thread
Old 18-09-2003, 05:14 AM   #1
Dale Wagner
Guest
 
Posts: n/a
Default How to tell where a mailtiem ended up after the rules wizard runs


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


  Reply With Quote
Old 18-09-2003, 07:37 PM   #2
Dmitry Streblechenko
Guest
 
Posts: n/a
Default Re: How to tell where a mailtiem ended up after the rules wizard runs

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
>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off