[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Drag and Drop message from Outlook Express or Outlook?

Posted on 2001-09-13
Medium Priority
Last Modified: 2007-12-19
I want drag and drop message with attachments! from Outlook Express in my application.
But in events OLEDragDrop i receive only text message (in one string variable From:, To:, Date:, Subject: and Body) and without attachments.

How to receive full message from DataObject?

Question by:kuzub
LVL 16

Expert Comment

ID: 6481062
LVL 54

Expert Comment

by:Ryan Chong
ID: 6493291
<listening but NO one post comment here..>
LVL 16

Expert Comment

ID: 6493937
Well, let us start then...
Which is the target control?
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!


Author Comment

ID: 6494135
Target Control - TreeView.

I tested Drag and Drop one message from Outlook Express 6.0 and Outlook 2000.
And I receive different string variable.
For Outlook Express   From: NikName <email@.....>
For Outlook 2000 Only From

And if I drag and drop  message which contain HTML
i receive VB error  message 'Method 'GetData' of object 'IVBDataObject' failed'

LVL 16

Expert Comment

ID: 6494581
With outlook express:

Private Sub TreeView1_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)

MsgBox Data.GetData(1)
End Sub

i got all text from: "from" to end of message.
I can't try with attachs since i haven't any msg with them.

Author Comment

ID: 6495696
But my questions about attachments.

Drag and drop message from Outlook Express to Explorer ->
I receive in  Explorer *.eml file.
Drag and drop message from Outlook 2000 to Explorer ->
I receive in  Explorer *.msg file.

Its files have full information about message.
And it i can load with the help CDO and save in database.

Now i use
If Data.GetFormat(vbCFText) Then

But from iMsg I can not receive the all information, necessary to me (attachments!).

LVL 16

Accepted Solution

Richie_Simonetti earned 800 total points
ID: 6496517
Constant vbCFText = 1

I did a little trick to know which type of data is comming to treeview, could do you a try?

Drag you message to treeview and see debug/inmediate window:

Private Sub TreeView1_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer,
Shift As Integer, x As Single, y As Single)
dim idx as long
for idx=1 to 9      ' supported formats: 1,2,3,8,9,&HBF00
    debug.print i & ": " &Data.Getformat(idx)
next idx
debug.print  "Link: " &Data.Getformat(&HBF00)

End Sub
LVL 16

Expert Comment

ID: 6497779
What happens here is:
When you drag msg from Outlook Express to Explorer, you got and .eml file,right?
But.... if you open that file with a text editor, you will get only text!
The attachment is there but in text format encoded with base64 (i think) algorythm. If you want the attachment, you need to decode yourself or you will get nothing.

These are links to base64 tools:

LVL 16

Expert Comment

ID: 6497787
LVL 49

Expert Comment

ID: 7208371
Hi kuzub,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept Richie_Simonetti's comment(s) as an answer.

kuzub, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
DanRollins -- EE database cleanup volunteer

Expert Comment

ID: 7241196
Per recommendation, force-accepted.

CS Moderator

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This collection of functions covers all the normal rounding methods of just about any numeric value.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question