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

How to change mail path in outlook



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 22nd 09, 01:33 PM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default How to change mail path in outlook

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


  #3  
Old August 25th 09, 01:08 PM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default How to change mail path in outlook

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.




  #4  
Old August 25th 09, 02:10 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

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.


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




  #6  
Old August 26th 09, 02:20 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

If your problems are with what's being returned by OnSyncSave as a folder
event sink then it's not an Outlook problem but a problem in the event sink.
I'd post about this in an Exchange development group. There's not much on
the Outlook end that you can do to fix what's coming in from that event
sink.

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


  #7  
Old August 27th 09, 02:43 PM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default How to change mail path in outlook

can you please give the link/subject for your post on event sink
"Ken Slovak - [MVP - Outlook]" wrote in message
...
If your problems are with what's being returned by OnSyncSave as a folder
event sink then it's not an Outlook problem but a problem in the event
sink. I'd post about this in an Exchange development group. There's not
much on the Outlook end that you can do to fix what's coming in from that
event sink.

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




  #8  
Old August 28th 09, 02:17 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

I don't post event sinks. I said to post in an Exchange development group
about that since your problem is with your event sink, not with Outlook.

--
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
...
can you please give the link/subject for your post on event sink


 




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
change the path of Outlook signatures Marie Outlook - Installation 1 February 16th 09 01:54 PM
change path to new .pst without user interaction Yuri NLD Outlook - Installation 2 January 21st 09 08:30 AM
Change outlook data file path Alex Verschoor Outlook - Installation 1 April 21st 08 03:24 PM
Change OLK8 path Concierge Outlook - General Queries 2 November 20th 06 01:09 AM
change the cache mode path (.ost file path) bln-ami Outlook - Installation 0 July 18th 06 08:45 AM


All times are GMT +1. The time now is 08:47 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.