Folder move event

  • Thread starter Thread starter Ashish
  • Start date Start date
A

Ashish

Folder move event does not give the correct path for folder name.
Suppose there is a under Inbox say inbox_Child.
In outlook when i move inbox_Child under draft folder then item_add event is
called which shows the path for inbox_Child as Inbox/inbox_Child(paren name
of inbox_Child is Inbox, it's not Drafts). While it should give
Drafts/inbox_Child.
Is there any way to get correct path.
 
There is no Folder.Move() event, what event are you talking about? What
version of Outlook? Please post enough specific information so someone can
answer your question.
 
sorry for mistake.
In outlook, When i move a folder from one folder to another folder then
following events called
folder_change and folder_add.
But folder_add does not show correct path for new folder.

Suppose under Inbox there is a folder "inbox_child".
When i move "inbox_child" under Drafts folder then folder_add events shows
following path for "inbox_child"
Inbox/inbox_child (i find this path by getting parent folder name of
"inbox_child", here "inbox_child" is argument in folder_add(mapifolder
inboxchildfolder)

While the path should be Drafts/inbox_child because "inbox_child" is moved
under Drafts oflder.

Is there some way to get the correct path.
 
The Folders.FolderAdd() event passes you the MAPIFolder instance that is
being added to that Folders collection. Keep that MAPIFolder reference and
find it after the event finishes, at which point the folder path should be
correct.

You still don't mention what version of Outlook you are targeting, but if it
is Outlook 2007 you might be better served by the Folder.BeforeFolderMove()
event, which provides a MoveTo Folder object that should have the correct
path (if the Folder is null the folder is being deleted). Folder is the new
super-object that subsumes the MAPIFolder object, but it and that event are
only available in Outlook 2007.
 
I'm using outlook 2003.
Keep that MAPIFolder reference and find it after the event finishes, at
which point the folder path should be correct.

If i keep Mapifolder reference then in which event/function i should find
it? After Folder_Add event folder_change event is not called for new folder
( Drafts folder where i moved a folder).
 
Use a timer to set up the polling for that. In that event handler set a
boolean flag and initialize the timer, when it fires do what you have to do.
Persist that MAPIFolder reference so you can use it in the timer event.
 
hello,

I have some issue related to the mail which is movd from one folder
to another. I use vsto 2005 and my target application is outlook 2007. As
soon as the mail comes to outlook, i read its contents like 'to address',
'from address', etc and generate a uniqueID and call a webservice to insert a
record into the database.

Basing on the 'Rules and Alerts' specified, the mail goes to custom
folder. The problem is I am unable to assign that uniqueID to UserProperty of
the mail in the destination custom folder.

I would be thankful to the people who help me.

Thanks & Regards,
Varma
 
Show the code you're using (and don't hijack other people's threads).




"Problem with UserProperty of mail object" <Problem with UserProperty of
mail (e-mail address removed)> wrote in message
news:[email protected]...
 
Back
Top