none
Catch start drag event mail item RRS feed

  • Question

  • Hi all,

    We are archiving mail into SharePoint folders. What i'm looking to do is to create a AddIn that on starting the drag event can change the subject of the mail. I want to add the date and time of the mail in front of the subject. In order to do this i'm looking to catch the event that starts the drag of a mail item. How can i do this?

    We are using Office 2013 and Visual Studio 2015.

    Wednesday, January 11, 2017 10:57 AM

All replies

  • Hello Jacob,

    The Outlook object model (nor VSTO) doesn't provide anything for detecting such operations. You may consider handling the SelectionChange event of the Explorer class which is fired when the user selects a different or additional Microsoft Outlook item programmatically or by interacting with the user interface. This event also occurs when the user (either programmatically or via the user interface) clicks or switches to a different folder that contains items, because Outlook automatically selects the first item in that folder.

    Public WithEvents myOlExp As Outlook.Explorer 
     
    Public Sub Initialize_handler()  
     Set myOlExp = Application.ActiveExplorer  
    End Sub  
     
    Private Sub myOlExp_SelectionChange()  
     MsgBox myOlExp.Selection.Count & " items selected."  
    End Sub


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Wednesday, January 11, 2017 11:26 AM
  • Ok, shame these events aren't available. Thanks for the info.
    Wednesday, January 11, 2017 12:29 PM
  • Hi,

    Unfortunately, Office does not provide the event.

    You may submit a feedback on the UserVoice Site:

    https://outlook.uservoice.com/

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, January 13, 2017 9:57 AM
    Moderator