Does anyone have any idea of how to drag an e-mail from Outlook or Outllok Express over a list box in a VB application and copy the .msg file into the listbox?
Are there any Active X controls that would support that kind of operation?
The closest thing I could find was to drag and drop the message on to the desktop - and then from windows explorer drag and drop it into the list box. From there you had one or two options:
Option one was to actually copy the file itself and the other option was to copy the text from the email.
Put the following code in your form.
___
[tt]
Private Sub Form_Resize()
Text1.Move 0, 0, ScaleWidth, ScaleHeight
End Sub
Private Sub Text1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Data.GetFormat(vbCFText) Then Text1 = Data.GetData(vbCFText)
End Sub[/tt]
___
Now run the program and drag-drop a message from Outlook to your textbox, the contents of the message will be captured directly in the textbox.
Checked with Outlook Express and its working fine.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.