c# drag drop get data from outlook email

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PaxForce
    New Member
    • Nov 2014
    • 1

    c# drag drop get data from outlook email

    Hi all, I would like to create a small C# application with this functionality.

    1. Drag&Drop an e-mail from Outlook onto a C#Form.

    2. the application will get the values in the e-mail and fill out the form fields (sender e-mail, subject, body of the email: client name, client surname, client message, etc.)

    This is ALL i need. Nothing complicated. I've searched the web and I can't find the solution to my problem. I found tutorials to create forms for doing all sorts of stuff I don't need. Pls help.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    You will probably have to look into what data is transferred upon dragging and dropping data from outlook into your application but this isn't too hard to do.

    The first thing you need to do is implement a method that handles the drop event.

    I'm not sure what kind of application you are developing so here are 2 articles on how to accomplish this:
    1. The WPF UIElement.Drop Event
    2. The Win Forms DragDropEffects



    I've never done this in a win forms application but it is pretty straight forward in the WPF version so I'm assuming it wont be complicated for the win forms version...

    Anyways, once you have implemented the method you will have to put a breakpoint on it and then actually drag and drop the data from Outlook onto the control that has the drop method attached to it.

    At that point the breakpoint will let you investigate the data that is provided to you at the time of dropping the data into your app so that you can figure out what to do with that data according to your needs.

    -Frinny

    Comment

    Working...