How to catch dragging of appointment-item without selecting it first RRS feed

  • Question

  • Hi, I want to catch event when user is dragging on top- or bottom-line of a appointment. If the user firstly selects the appointment then I can catch the event in explorer's SelectionChange event. But I can't find a way to catch the event when the user simply hovers the appointment with the mouse and then drags the top- or bottom-line.

    Best regards Esben Rud Nielsen, Bankdata, DK

    Friday, September 26, 2014 7:21 AM


  • Hello Esben,

    The Outlook object model doesn't fire any events for dragging and dropping operations. However, when you drop something (a file) on the inspector window the default action is to attach a file. So, you can try to handle the following events available in the Outlook object model:

    BeforeAttachmentAdd - the event is fired before an attachment is added to an instance of the parent object. Set Cancel parameter to True to cancel the operation; otherwise, set to False to allow the Attachment to be added.

    AttachmentAdd - the event is fired when an attachment has been added to an instance of the parent object.

    As you may see you can cancel the default action and do whatever you need with a dropped file.

    Also you may consider adding an Outlook form region where you can handle all drag & drop operations in the way you need. See Creating Outlook Form Regions for more information.

    Friday, September 26, 2014 10:22 AM