View Single Post
  #4  
Old June 17th 09, 04:02 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Folder move event

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.

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


Ads