Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   Folder move event (http://www.outlookbanter.com/add-ins-outlook/91607-folder-move-event.html)

Ashish June 16th 09 08:56 AM

Folder move event
 
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.



Ken Slovak - [MVP - Outlook] June 16th 09 01:55 PM

Folder move event
 
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.

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



Ashish June 17th 09 07:45 AM

Folder move event
 
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.

"Ken Slovak - [MVP - Outlook]" wrote in message
...
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.

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





Ken Slovak - [MVP - Outlook] June 17th 09 04:02 PM

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.



Ashish June 18th 09 07:21 AM

Folder move event
 
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).


"Ken Slovak - [MVP - Outlook]" wrote in message
...
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.





Ken Slovak - [MVP - Outlook] June 18th 09 01:41 PM

Folder move event
 
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.

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



Problem with UserProperty of mail object August 4th 09 03:19 PM

Folder move 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



"Ken Slovak - [MVP - Outlook]" wrote:

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.

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




Ken Slovak - [MVP - Outlook] August 4th 09 04:26 PM

Folder move event
 
Show the code you're using (and don't hijack other people's threads).

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


"Problem with UserProperty of mail object" Problem with UserProperty of
mail wrote in message
...
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




All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com