![]() |
No entryid on Itemsend Event
Hi,
i'm developping an outlook addin who log all email send. There is the code Private Sub goOutlook_ItemSend(ByVal Item As Object, Cancel As Boolean) If Item.Class = 43 Then Item.Save writetmp Item.EntryID + "$" + Item.Parent.StoreID End If End sub If i remove Item.save method, Item.EntryID is empty, if i use item.save method, entryid is not null, but outlook change is value after itemsend method. thats why what i log is wrong. There is a solution to get right entryid on a sent item ? Thanks |
No entryid on Itemsend Event
Until the item is saved or after it's sent it has no EntryID value. That's
why Save() would be needed. However, there is no guarantee that an EntryID will remain constant when an item is moved within the store. That depends on the store provider. With the PST store provider EntryID's remain the same as long as the item is in the same store, even when it's deleted and in Deleted Items. With an Exchange store provider the EntryID changes when an item is moved from one folder to another. You will need to trap the ItemAdd() event of the Items collection in the Sent Items folder. When that event fires you can then get the EntryID. That will cover all cases except where the item is set to not be saved after sending or to be saved with the item being replied/forwarded. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm wrote in message ... Hi, i'm developping an outlook addin who log all email send. There is the code Private Sub goOutlook_ItemSend(ByVal Item As Object, Cancel As Boolean) If Item.Class = 43 Then Item.Save writetmp Item.EntryID + "$" + Item.Parent.StoreID End If End sub If i remove Item.save method, Item.EntryID is empty, if i use item.save method, entryid is not null, but outlook change is value after itemsend method. thats why what i log is wrong. There is a solution to get right entryid on a sent item ? Thanks |
No entryid on Itemsend Event
Hi Ken,
I have the same problem. My scenario is only valid when a user forwards an item either from the inbox or from some other folder. I trap the ItemAdd() event in the sent items folder, is there any way I can find out the which item or items were forwarded in the parent folder? My requirement is I need move the items from the sent items folder and also remove the original emails from the parent folders. Thanks for all the help Ashok "Ken Slovak - [MVP - Outlook]" wrote: Until the item is saved or after it's sent it has no EntryID value. That's why Save() would be needed. However, there is no guarantee that an EntryID will remain constant when an item is moved within the store. That depends on the store provider. With the PST store provider EntryID's remain the same as long as the item is in the same store, even when it's deleted and in Deleted Items. With an Exchange store provider the EntryID changes when an item is moved from one folder to another. You will need to trap the ItemAdd() event of the Items collection in the Sent Items folder. When that event fires you can then get the EntryID. That will cover all cases except where the item is set to not be saved after sending or to be saved with the item being replied/forwarded. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm wrote in message ... Hi, i'm developping an outlook addin who log all email send. There is the code Private Sub goOutlook_ItemSend(ByVal Item As Object, Cancel As Boolean) If Item.Class = 43 Then Item.Save writetmp Item.EntryID + "$" + Item.Parent.StoreID End If End sub If i remove Item.save method, Item.EntryID is empty, if i use item.save method, entryid is not null, but outlook change is value after itemsend method. thats why what i log is wrong. There is a solution to get right entryid on a sent item ? Thanks |
No entryid on Itemsend Event
Look at ConversationIndex and ConversationTopic. Those will let you link the
item in Sent Items to the original item. All items in a thread have the same ConversationTopic value. For each new item in the thread the ConversationIndex has a new date/time structure value added to it. So each new item in the thread has ConversationIndex just a bit longer than the previous item. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Ashok" wrote in message ... Hi Ken, I have the same problem. My scenario is only valid when a user forwards an item either from the inbox or from some other folder. I trap the ItemAdd() event in the sent items folder, is there any way I can find out the which item or items were forwarded in the parent folder? My requirement is I need move the items from the sent items folder and also remove the original emails from the parent folders. Thanks for all the help Ashok |
All times are GMT +1. The time now is 12:28 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com