View Single Post
  #5  
Old August 26th 09, 11:31 AM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default How to change mail path in outlook

I'm not doing anything with subject. I was using subject keyword for
folowing purpose
If we open a mailsave any mail item, we access it using
inspector.currentitem and save this mail (mailitem-Save() method) then
outlook generates a path which we get in OnSyncSave. This path contains mail
location in its folder like ..Inbox/mailsubject.eml
Before saving mail i did not change subject.
Here my question is
If any other mail (having same subject) is also there in same folder then we
get the path for old mail in onsyncsave while we did not open/access old
mail.

To generate correct path before saving mail i change many fields of current
mail but still onsyncsave shows path for another mail.

"Ken Slovak - [MVP - Outlook]" wrote in message
...
I don't really follow what your problem is. Subject is never a good way to
track anything anyway. If an item is saved, which you can check, use the
EntryID as the unique identifier for that item, that's what it's there for.

If you have a reference to Inspector.CurrentItem then that is a fixed
reference, it doesn't relate at all to any other item open in any other
Inspector. I fail to see how they can be confused.

--
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
...
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.




Ads