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

Trapping message move operations



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 7th 07, 03:55 PM posted to microsoft.public.outlook.program_addins
xyz250
external usenet poster
 
Posts: 2
Default Trapping message move operations

Hi all,

I've been struggling with a unique issue for a couple days and hope
someone can assist. I have a requirement to trap all message move
operations when a user moves messages to folders outside the mailbox,
i.e. to a public folder or another mailbox. Essentially, the add-in
will be responsible for displaying a message box stating that this
type of operation is not valid.

I've placed my code in the exlporer's BeforeItemPaste event, but so
far the event only fires when a message move is initiated via a drag
and drop method, or if the Cut and Paste functions on the Edit menu
are utilized. If the Move to folder function on the Edit menu, the
right-click context menu or the Move to folder button on the exlporer
and inspector tool bars are used, the BeforeItemPaste item does not
fire.

Does anyone have any ideas as to how I trap messages moved using the
above methods? Any insight is appreciated.

Thanks,

Chris
  #2  
Old December 7th 07, 05:52 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Trapping message move operations

You'd have to handle the MAPIFolder.Items.ItemAdd event on any possible
folder where the user could move items. ItemRemove on the
ActiveExplorer.CurrentFolder.Items collection wouldn't help it fires after
the removal of an item and can't be canceled and doesn't tell you where an
item was moved.

You might want to consider disabling the menu buttons that allow the
move/copy operations and substituting your own buttons and therefore having
control over moves/copies, but that would be only a partial solution since
the user could still move or copy items using the Navigation Pane.

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


"xyz250" wrote in message
...
Hi all,

I've been struggling with a unique issue for a couple days and hope
someone can assist. I have a requirement to trap all message move
operations when a user moves messages to folders outside the mailbox,
i.e. to a public folder or another mailbox. Essentially, the add-in
will be responsible for displaying a message box stating that this
type of operation is not valid.

I've placed my code in the exlporer's BeforeItemPaste event, but so
far the event only fires when a message move is initiated via a drag
and drop method, or if the Cut and Paste functions on the Edit menu
are utilized. If the Move to folder function on the Edit menu, the
right-click context menu or the Move to folder button on the exlporer
and inspector tool bars are used, the BeforeItemPaste item does not
fire.

Does anyone have any ideas as to how I trap messages moved using the
above methods? Any insight is appreciated.

Thanks,

Chris


  #3  
Old December 10th 07, 08:07 PM posted to microsoft.public.outlook.program_addins
xyz250
external usenet poster
 
Posts: 2
Default Trapping message move operations

Thanks for your response Ken. I don't think I can take the approach
of handling the MAPIFolder.Items.ItemAdd event because of the sheer
number of potential folders the user could move the message to. I
kind of like the idea of disabling the buttons on the toolbar and
subsituting my own, but like you said, there are other ways to copy/
move messages. It looks like I will not be able to provide the
functionality I need, at least not in an add-in. Thanks again for
your help.

Chris

On Dec 7, 12:52 pm, "Ken Slovak - [MVP - Outlook]"
wrote:
You'd have to handle the MAPIFolder.Items.ItemAdd event on any possible
folder where the user could move items. ItemRemove on the
ActiveExplorer.CurrentFolder.Items collection wouldn't help it fires after
the removal of an item and can't be canceled and doesn't tell you where an
item was moved.

You might want to consider disabling the menu buttons that allow the
move/copy operations and substituting your own buttons and therefore having
control over moves/copies, but that would be only a partial solution since
the user could still move or copy items using the Navigation Pane.

--
Ken Slovak
[MVP - Outlook]http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm

"xyz250" wrote in message

...



Hi all,


I've been struggling with a unique issue for a couple days and hope
someone can assist. I have a requirement to trap all message move
operations when a user moves messages to folders outside the mailbox,
i.e. to a public folder or another mailbox. Essentially, the add-in
will be responsible for displaying a message box stating that this
type of operation is not valid.


I've placed my code in the exlporer's BeforeItemPaste event, but so
far the event only fires when a message move is initiated via a drag
and drop method, or if the Cut and Paste functions on the Edit menu
are utilized. If the Move to folder function on the Edit menu, the
right-click context menu or the Move to folder button on the exlporer
and inspector tool bars are used, the BeforeItemPaste item does not
fire.


Does anyone have any ideas as to how I trap messages moved using the
above methods? Any insight is appreciated.


Thanks,


Chris- Hide quoted text -


- Show quoted text -


 




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
Inspector and trapping of shortcuts Petr Nehez Add-ins for Outlook 0 December 22nd 06 09:34 AM
Outlook Hangs during operations Janaka Sampath Outlook - General Queries 3 July 24th 06 07:58 PM
About critical operations in Outllookexhress ÷ÌÁÄÉÍÉÒ éÌØÉÎ Outlook Express 2 June 20th 06 11:42 AM
Redemption Trapping a Condition or a Setting bobdydd Outlook - General Queries 3 June 2nd 06 02:55 PM
Redemption Trapping a Condition or a Setting bobdydd Outlook and VBA 3 June 2nd 06 02:55 PM


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