?
Solved

Drag and Drop message from Outlook Express or Outlook?

Posted on 2001-09-13
12
Medium Priority
?
812 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 53

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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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 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
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

771 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