drag/drop email message

  • Thread starter Thread starter Tom Olson
  • Start date Start date
T

Tom Olson

I am trying to implement drag/drop functionality of email
messages from Outlook into my user control. The goal is
to capture the drop event and create a .msg file similar
to doing a "Save As..." from Outlook or dragging an email
into Windows explorer. I seem to get only a portion of
the email if I use DataFormats.Text (i.e.
To/From/Subject). My current workaround is to save the
email to a .msg file on the disk and then drag that file
into my control from explorer. Any help would be greatly
appreciated. Thanks.
 
Hi Tom,
Outlook is using an IDataObject to do this internally, but the
structure and format of this data is not published
(nor will it be asfik). So it maybe not possible to get an Message via
ClipBoard directly. Perhaps, you may seek and retrieve this mail by those
text using automation with Outlook. You may go to the Outlook/office
development group for more information, thanks!


Kind regards,

Ying-Shen Yu [MS]
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. 2001 Microsoft Corporation. All rights
reserved.
--------------------
| Content-Class: urn:content-classes:message
| From: "Tom Olson" <[email protected]>
| Sender: "Tom Olson" <[email protected]>
| Subject: drag/drop email message
| Date: Fri, 29 Aug 2003 14:44:48 -0700
| Lines: 10
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNudsT8wYG6Qv7bRSKh065Kq9l1ww==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:51286
| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| I am trying to implement drag/drop functionality of email
| messages from Outlook into my user control. The goal is
| to capture the drop event and create a .msg file similar
| to doing a "Save As..." from Outlook or dragging an email
| into Windows explorer. I seem to get only a portion of
| the email if I use DataFormats.Text (i.e.
| To/From/Subject). My current workaround is to save the
| email to a .msg file on the disk and then drag that file
| into my control from explorer. Any help would be greatly
| appreciated. Thanks.
|
 
I have opened a service request with Microsoft support.
They have a DLL that can be called from VB6 which uses the
IDataObject interface to stream the message to disk.
Unfortunately this DLL can not be called from the .NET
framework because the IDataObject interface is not
available in the .NET dragdrop callback parameters.
If/when I get this resolved I'll update this posting.
Thanks.
 
I just got advised by Microsoft support that what I'm
trying to do is not possible in the .NET framework. You
either have to write unmanged C++ code or use the Outlook
object model to "Save" the message. The problem with
using the Outlook object model is that in order to access
the message without getting security dialogs popping up
you have to lower the security settings. Bummer.
-----Original Message-----
I have opened a service request with Microsoft support.
They have a DLL that can be called from VB6 which uses the
IDataObject interface to stream the message to disk.
Unfortunately this DLL can not be called from the .NET
framework because the IDataObject interface is not
available in the .NET dragdrop callback parameters.
If/when I get this resolved I'll update this posting.
Thanks.
-----Original Message-----
Hi Tom,
Outlook is using an IDataObject to do this internally, but the
structure and format of this data is not published
(nor will it be asfik). So it maybe not possible to get an Message via
ClipBoard directly. Perhaps, you may seek and retrieve this mail by those
text using automation with Outlook. You may go to the Outlook/office
development group for more information, thanks!


Kind regards,

Ying-Shen Yu [MS]
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. 2001 Microsoft Corporation. All rights
reserved.
--------------------
| Content-Class: urn:content-classes:message
| From: "Tom Olson" <[email protected]>
| Sender: "Tom Olson" <[email protected]>
| Subject: drag/drop email message
| Date: Fri, 29 Aug 2003 14:44:48 -0700
| Lines: 10
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNudsT8wYG6Qv7bRSKh065Kq9l1ww==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:51286
| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| I am trying to implement drag/drop functionality of email
| messages from Outlook into my user control. The goal is
| to capture the drop event and create a .msg file similar
| to doing a "Save As..." from Outlook or dragging an email
| into Windows explorer. I seem to get only a portion of
| the email if I use DataFormats.Text (i.e.
| To/From/Subject). My current workaround is to save the
| email to a .msg file on the disk and then drag that file
| into my control from explorer. Any help would be greatly
| appreciated. Thanks.
|

.
.
 
Back
Top