Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Eugene, Oregon, USA
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MailItem--Internet Header (2000/SR-1)

    does anyone know how to programatically access the Internet Headers for a MailItem? (The info that tells you how an Internet mailitem has been routed that you get when you right-click a message and select "Options")

  2. #2
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Eugene, Oregon, USA
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MailItem--Internet Header (2000/SR-1)

    i just found some Microsoft sample code here and it does the trick.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: MailItem--Internet Header (2000/SR-1)

    If you rule out SendKeys, the only other option I know of is the Redemption library.
    <hr>Internet headers - PR_TRANSPORT_MESSAGE_HEADERS property. If you have spent any time in the Outlook developer newsgroups, you know how often this question is asked:

    dim utils, oItem, PrHeaders, Subject
    set utils = CreateObject("Redemption.MAPIUtils")
    set oItem = Outlook.Session.GetDefaultFolder(6).Items(1) 'Get the first item in the inbox, can be any other mail item
    PrHeaders = &H007D001E
    Subject = utils.HrGetOneProp(oItem.MAPIOBJECT, PrHeaders)
    MsgBox Subject<hr>
    I haven't tried it out myself, but using Redemption instead of CDO should avoid annoying security warnings that you might otherwise encounter.

Posting Permissions

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