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