Drag & Drop message from Outlook to VB 6 application

Posted on 2006-03-28
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.
Question by:khooc
    1 Comment
    LVL 28

    Accepted Solution

    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

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now