Results 1 to 5 of 5

Thread: Retrieving e-mail contents from OE 5.0 to VB test box

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 1999
    Location
    Port Coquitlam, BC, Canada
    Posts
    6

    Post

    Recently, I am thinking a way to retrieve e-mail content from OE 5.0 to a text box on a VB(6.0) form.

    I've added to OE 5.0 type library onto my project but could not figure out how to put in the correct settings to make the control works. I've tried to use Data Bindings property of the control, but there are no options for Data Source available to choose.

    Can anybody give me a hand on this problem?

  2. #2
    Lively Member Ishamel's Avatar
    Join Date
    Nov 1999
    Location
    Edinburgh, Scotland
    Posts
    112

    Post

    This might help.

    Use Items(index), where index is the index number of a mail message to return a single MailItem object from an Inbox folder. The following example sets the current folder as the Inbox and displays the second mail message in the folder.

    Place the following in any event.

    Code:
        
        Set myOlApp = CreateObject("Outlook.Application")
        Set myNamespace = myOlApp.GetNamespace("MAPI")
        Set myFolder = myNamespace.GetDefaultFolder(olFolderInbox)
        Set myItem = myFolder.Items(2)
    
    
        Text1.Text = myItem.Body

    ------------------
    Ishamel
    KBurt59082@AOL.COM



    [This message has been edited by Ishamel (edited 12-08-1999).]

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 1999
    Location
    Port Coquitlam, BC, Canada
    Posts
    6

    Post

    Thanks Ishamel.

    However, the code you provided is just for Outlook not for Outlook Express 5.0.

    Do you know how can I create object of Outlook Express 5.0 on my VB 6.0 project? It'll be great if you have any idea on this, I've been searching articles regarding this in the past few days but still could not get a crew.


  4. #4
    Lively Member Ishamel's Avatar
    Join Date
    Nov 1999
    Location
    Edinburgh, Scotland
    Posts
    112

    Post

    I've not got Outloook Express 5.0 on the PC I'm using just now, so unforunately I can't check the Class name. I can check it when I get home, but that won't be for another 6 hours. (6 very long hours!!!)

    In the meantime - I found this in a help file which might be enough for you to find out the Class ID for the Outlook Express 5.0 application.

    *******************************************

    For a list of the ProgIDs available on your system, look in regedit.exe under the HKEY_CLASSES_ROOT\Clsid key. There you will find all the ProgIDs for everything you've got registered in your system.

    Common examples would be "Word.Document", "Excel.Worksheet", "InternetExplorer.Application", etc.

    ********************************************

    It'll be like finding a needle in a haystack, but if you do a search on "Outlook" it should make things a bit easier.

    Good luck.

    ------------------
    Ishamel
    KBurt59082@AOL.COM


  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 1999
    Location
    Port Coquitlam, BC, Canada
    Posts
    6

    Post

    I seems I am getting closer now.

    I've find the object name. It's OutlookExpress.MessageList and it works fine when I use the CreateObject function in VB. However, the next problem is that the properties in the MessageList object are totally different from those in Outlook.Application. Is there any documentation I can check into how to use the OutlookExpress.MessageList properties ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width