PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Re: get a sent mail ID
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Re: get a sent mail ID
![]() |
Re: get a sent mail ID |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
That's about the only way if you're using CDO, which has no events. If you
also are using Outlook object model code just handle the ItemAdd event on the Items collection of the Sent Items folder. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Xiao" <Xiao@discussions.microsoft.com> wrote in message news:572E6874-5B3F-41F7-BCDA-88797F16B9A4@microsoft.com... > Hi, I'm wondering how i could get the get the ID of a message that i've > just > sent. > I'm using CDO, and after sending the message with MAPI.Message.Send all > the > message references are cleared. I know that the message it's copy in the > sent > mail box after sending, and i could find accessing in this folder but this > it's a long way. > Please,if you know a better way, please help me. > > Thanks. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
PR_RECORD_KEY can be used although it's not an exact match for the EntryID.
I believe the first 20 bytes represent the short term EntryID of the item. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Xiao" <Xiao@discussions.microsoft.com> wrote in message news:FC08E954-57F7-485E-BCFC-39DBDFB9602B@microsoft.com... > thanks ken, > Only one thing more, do you know if there is any Id or reference that > connect the sent mail with the original one |
|
|
|
#3 |
|
Guest
Posts: n/a
|
You can't change how Outlook does sending. However, you should be able to
trap ItemAdd on Sent Items with no problems, I do that all the time. The item won't be added there until the item is actually sent out of course. An event handler lets you not worry about when something is added, it fires when the item is added no matter when. You will need an object variable that handles events for that folder that will remain in scope throughout the life of your application. If using .NET code you have to avoid the garbage collector removing your folder object, items collection and event handler. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Xiao" <Xiao@discussions.microsoft.com> wrote in message news:F76873E4-4008-4232-A161-8DEA9DF9B873@microsoft.com... > Thanks again ken, > I've been also try to access to the setn item folder, but i think that the > send process is asyncronous and it takes longer to create the new mail in > the > sent mail than i access to the fodler and try to find the recent one. Can > i > do the sending process syncronous? > > Thanks again for your help |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

