Results 1 to 2 of 2

Thread: Finding the email address in Outlook.MailItem

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    262

    Finding the email address in Outlook.MailItem

    Is there any way to find the e-mail address that an e-mail was sent to using the outlook mailitem.
    Eg
    VB Code:
    1. Dim omitem As Outlook.MailItem
    2. 'blah blah code
    3.  
    4. Msgbox omitem.To
    Gives me my Exchange name, rather than the actual e-mail address the message was sent to, but if I physically look in the e-mail headers I can see the e-mail address, so the info is there.

    Thanks

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Finding the email address in Outlook.MailItem

    u need to tap the recipients data...
    VB Code:
    1. Dim oMail As Outlook.MailItem
    2. Dim oRecip As Outlook.Recipient
    3. '...other stuff...
    4. For Each oRecip In oMail.Recipients
    5.     Debug.Print oRecip.Address 'Not sure which one...
    6.     Debug.Print oRecip.AddressEntry
    7. Next
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

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