We help IT Professionals succeed at work.

Drag & Drop message from Outlook to VB 6 application

khooc asked
Medium Priority
Last Modified: 2010-02-07
I'm looking to drag & drop an email from Outlook to a VB 6 application.

I need to be able to look at the From, Subject & Message field (The office is using Office 97).

Does anyone have source code on how to do this?  Even a simple tutorial (open vb6, place textbox on form, etc...) will be a good start.
Watch Question

Try this. Add 3 Textboxes to a form. Set the Forms OleDropMode property to Manual. Then add this to your form and drop a message from Outlook onto the Form Area.

Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim arrMsg() As String
Dim MsgData As String
MsgData = Data.GetData(vbCFText)
MsgData = Mid$(MsgData, InStr(MsgData, Chr$(13)) + 2)
arrMsg = Split(MsgData, vbTab)
Text1.Text = arrMsg(0)
Text2.Text = arrMsg(1)
Text3.Text = arrMsg(2)
End Sub

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.