Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Drag and Drop message from Outlook Express or Outlook?

Posted on 2001-09-13
12
Medium Priority
?
824 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
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
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…

636 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