View Single Post
  #3  
Old February 26th 09, 10:41 PM posted to microsoft.public.outlook.program_addins
Ashok
external usenet poster
 
Posts: 10
Default 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



Ads