Drag and Drop a File as Link to Outlook

MobileMasters 1 Reputation point
2020-12-04T11:29:35.053+00:00

I have a requirement to drag and drop a file node from a C# treeview to new email in outlook. The file has to be added as a link in the email. Is there anyway we can capture the drop event of outlook so that we can do custom logic to add file as link?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,936 questions
{count} votes

1 answer

Sort by: Most helpful
  1. JeffYang-MSFT 6,241 Reputation points Microsoft Vendor
    2020-12-07T02:25:50.273+00:00

    Hi @MobileMasters ,

    Welcome to Microsoft Q&A forum.

    As I know, in Outlook desktop client, we could add files as links in Outlook email messages via "Insert">"Link" like below. And please kindly understand that here we mainly focus on general issues about Outlook desktop client and know little about Outlook for developer here, I'm not quite sure if it could be used to the " file node from a C# treeview" you mentioned.
    45348-image.png

    I did some research about the "capture the drop event of outlook" and found that the DoDragDrop Windows API function might be helpful to your issue just as @Dmitry mentioned in this thread: How to detect drag and drop event in Outlook 2016. Besides, if you still would like more developer-related information about that, it is suggested for you to post a new thread in the dedicated forum for Outlook for developers.

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=outlookdev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thanks for your understanding and hope your question will be resolved soon.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.