Thanks for reply. I'm doing same as you explained. Lets take the case when
open a mail.
I'm handling in Inspectors.NewInspector and accessing it using
Inspector.CurrentItem.
Suppose there is a mail in draft folder. After opening mail i change its
subject and save this mail. After saving outlook generates path for old
subject mail. Same think happen if a folder contains a mail with some
subject and i create new mail with same subject in same folder.
In all above cases i'm accessing current mail using Inspector.CurrentItem.
But outlook generates path for another mail while it was not open.
Please explain what to do. Sorry i could not get you properly.
"Ken Slovak - [MVP - Outlook]" wrote in message
...
In an Outlook addin you can handle Inspectors.NewInspector() to know when
an item has been opened. You can then handle any event on that Inspector,
or by using Inspector.CurrentItem, any event on the item. You usually set
up the event handlers in the initial Activate() event of the Inspector.
Saving an item fires item.Write().
If the item hasn't been opened but was edited in the folder view
(Explorer) using in-cell editing then you'd have to handle
Explorer.SelectionChange() on the ActiveExplorer() object, then
instantiate event handlers for each member of that Selection collection.
--
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
"Ashish" wrote in message
...
In outlook addin if we save a mail (mailitem-Save) then outlook
generates an event for saving this mail which we get on exchange server
in OnSyncSave. If we saved a mail under inbox folder (say
..Inbox/mail.eml) then we'll get same path in onsyncsave.
But when we change subject of a mail and save this, outlook generates
path for old subject mail for example
if mail subject under inbox is mail1. We change subject to mail2 and save
this mail then outlook generates path as ..Inbox/mail1 which is wrong. It
should be ..Inbox/mail2.
Also if we have a mail with subject mail1 under drafts folder and we
create a new mail with same subject and save in drafts folder, outlook
generates path as ..Drafts/mail1 which it should be ..drafts/mail1-2. And
sometimes outlook generates path for this mail in Sync Issue folder.
Can we handle this in outlook addin? Does outlook addin allows to
generate correct path? If yes please give any example.