Solved

Drag and Drop message from Outlook Express or Outlook?

Posted on 2001-09-13
12
799 Views
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?



0
Comment
Question by:kuzub
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6481062
Interesting...
0
 
LVL 52

Expert Comment

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

Expert Comment

by:Richie_Simonetti
ID: 6493937
Well, let us start then...
Which is the target control?
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 1

Author Comment

by:kuzub
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.
Example
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'




0
 
LVL 16

Expert Comment

by:Richie_Simonetti
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.
0
 
LVL 1

Author Comment

by:kuzub
ID: 6495696
But my questions about attachments.

Example:
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
iMsg=Data.GetData(vbCFText)

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




0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 200 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
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
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:

0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6497787
0
 
LVL 49

Expert Comment

by:DanRollins
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
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7241196
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

695 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