A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

No entryid on Itemsend Event



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 18th 09, 08:34 AM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 1
Default 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
Ads
  #2  
Old February 18th 09, 02:13 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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


  #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



  #4  
Old March 2nd 09, 04:20 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I capture the event ItemSend from a macro? Totem Outlook and VBA 13 April 25th 08 02:05 PM
ItemSend Event Catalin Outlook and VBA 4 January 17th 08 07:17 PM
Cancelling and closing a mailitem in itemsend event bstrum Add-ins for Outlook 1 June 19th 07 05:53 AM
Write RTF-Body on ItemSend event Thomas Add-ins for Outlook 2 February 12th 07 11:22 AM
ItemSend event differences betweek W2K & WXP Lionel H Outlook and VBA 4 October 20th 06 03:16 PM


All times are GMT +1. The time now is 08:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.