This is a bit of a soft question, as I haven't really gotten to the point where I have started coding my project yet. What I'm looking for here are guidelines and recommendations as how best to build my desired software.
I've always been fascinated with drag and drop technology, and Outlook let's me drag an email to my desktop (in Windows) without a problem.
I wish to be able to continue to do this, but when dragged and dropped, I want the email on my desktop to be in .txt
format, and be filled with the content of the email.
Now, the following is a little free thinking as to what I have going in my head thus far.
In order to drag an email out of Outlook it has to be selected, so I am thinking I can obtain the selected email through the following in C#
.
Firstly using:
using Office = Microsoft.Office.Core;
using Outlook = Microsoft.Office.Interop.Outlook;
Then getting the currently selected email by:
Outlook.Selection currentSelection = control.Context as Outlook.Selection;
Outlook.MailItem selectedMail = currentSelection[1];
Now, the way I see it, the content from the email needs to be obtained when the dragging begins, and result in a new .txt
file when the drop happens, containing for example the message body text.
But that's just me thinking aloud.
How would some of you guys go about it?
Is there some way to specify an event occurrence when an element in Outlook is dragged?
And if so, can I specify what happens to the processed information when it drops? Like pasting it into a new .txt
file at the desired location?
Or am I thinking about this all wrong?