The two answers above are good. However, there are a few things you need to know.
In the first answer, you can download a sample program and run it, and you will find that everything works fine while you run it on a 32-bit computer, otherwise you will have to recompile your program from "AnyCPU" to "X86". I spent most of today trying to figure out why the first two characters of the .msg file name (from the letters) that I was dragging were missing. As soon as I recompiled with "X86", everything began to work.
In the second answer, you will find that yes, you can use the code, and it is much simpler, however, if you need your application to run in a different version of Outlook (except the one you added to your links), this probably will not work . I used to use the same Office objects that were mentioned in the second answer, and I ran into problems all the time when someone wanted to use my program in a different version of Office (i.e. if I pulled out in Office version 14, and they wanted to use it in Office 2007).
Donald
source share