View Single Post
  #2  
Old August 24th 09, 02:11 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to change mail path in outlook

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.


Ads