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