Results 1 to 10 of 10
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Brookline, Massachusetts, USA
    Posts
    606
    Thanks
    17
    Thanked 0 Times in 0 Posts

    e-mail header (OXP SP2)

    Is there a setting in Outlook that allows me to see the complete Internet Header on my email? I've just moved over from Eudora, where the full header, not just From and To, always appears. I've looked up Help/Header but that doesn't seems to deal with this isssue.

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: e-mail header (OXP SP2)

    Tools > Options

    For ease, open a new mail item, click on the toolbar and select customize. If you add the 'Options' button there, it will always be just a click away...

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: e-mail header (OXP SP2)

    Either right click the e-mail in the main Outlook window, and select Options..., or open the message, and select View | Options...

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Brookline, Massachusetts, USA
    Posts
    606
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Re: e-mail header (OXP SP2)

    Thanks Hans,
    One more option that I'm now familiar with.
    How do I print the Internet header (right clicking offers no print option, CTRL-P does nothing)?
    Is there an option that makes the Internet Header always appear, or am I limited to View/Options?

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Brookline, Massachusetts, USA
    Posts
    606
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Re: e-mail header (OXP SP2)

    Thanks Leif,
    I've added the View Button to my Toolbar. Is there a way to add the Internet Header to the email and print the whole thing? That would be useful in debugging bouncebacks, etc.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: e-mail header (OXP SP2)

    I don't think that there is a way to make the Internet header always appear. If you want to print it, you can copy it to Notepad, Word or another text editor and print from there (Ctrl+A to select the entire header, Ctrl+C to copy, then Ctrl+V in your favorite text editor.)

    If you really need to get at the Internet header often, you could create a macro. The Outlook object model doesn't expose the Internet header, but the Microsoft CDO 1.21 Library does (you need to set a reference to it in Tools | References... in the Visual Basic Editor). The following code is from Outlook MVP Neo; it outputs the Internet header of the first selected message in the Inbox to the Immediate window, but it can be adapted to your taste.

    Sub GetMAPIFields()
    Dim objCDO As MAPI.Session
    Dim objMsg As MAPI.Message
    Dim objSender As MAPI.AddressEntry
    Dim oMsg As Outlook.MailItem
    Dim oFields As MAPI.Fields
    Dim oField As MAPI.Field
    On Error Resume Next
    Set oMsg = Application.ActiveExplorer.Selection.Item(1)
    Set objCDO = CreateObject("MAPI.Session")
    objCDO.Logon "", "", False, False
    Set objMsg = objCDO.GetMessage(oMsg.EntryID)
    Set oFields = objMsg.Fields
    Debug.Print oFields.Item(&H7D001E).Value
    End Sub

    Note: Outlook security will kick in if you run this code.

  7. #7
    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: e-mail header (OXP SP2)

    You cannot make the Internet Headers appear in the default form Microsoft provides, and I think it would be very hard to edit the form to show this information.

    Here's a variation on the code Hans provided; it's commented to provide more explanation:

    <pre>Public Function InternetHeaders() As String
    'From http://www.slovaktech.com/code_sampl...nternetHeaders as of 1/23/02

    Dim objOutlook As Outlook.Application
    Dim objItem As Outlook.MailItem
    'next 3 statements require a reference to the Microsoft CDO 1.21 Library
    Dim objCDO As MAPI.Session
    Dim objMessage As MAPI.Message
    Dim objFields As MAPI.Fields
    Dim strID As String

    'this is not necessary if you set a reference as noted above
    Const CdoPR_TRANSPORT_MESSAGE_HEADERS = &H7D001E

    On Error Resume Next

    ' Instantiate an Outlook Application object.
    Set objOutlook = CreateObject("Outlook.Application")

    'Find the current email item and get its EntryID
    Set objItem = objOutlook.ActiveInspector.CurrentItem
    strID = objItem.EntryID

    'Then set up a CDO Session using a piggy-back login
    Set objCDO = CreateObject("MAPI.Session")
    objCDO.Logon "", "", False, False

    'Now get the item as a CDO Message
    Set objMessage = objCDO.GetMessage(strID)

    'Now get the headers from the message
    Set objFields = objMessage.Fields
    InternetHeaders = objFields.Item(CdoPR_TRANSPORT_MESSAGE_HEADERS).Va lue
    'Now that the headers are captured in a string you can do whatever you want with them

    objCDO.Logoff
    Set objFields = Nothing
    Set objMessage = Nothing
    Set objCDO = Nothing
    Set objItem = Nothing
    Set objOutlook = Nothing

    'for demo only...
    MsgBox InternetHeaders
    End Function</pre>


    As an alternative to CDO, you can download the Redemption object library to bypass the security restriction. Redemption is not redistributable without a license, though, if that matters.

    In the past, I've used SendKeys to copy the header to the clipboard. This only works if the message is open:
    <pre>Sub GrabHeader()
    ' JFS 5/27/2000
    If MsgBox("Copy the Internet message header to the clipboard?", vbQuestion + vbYesNo) _
    = vbYes Then
    SendKeys "%vp%h" 'open dialog and select Internet header
    SendKeys "^c" 'copy to the clipboard
    SendKeys "{ENTER}", True 'close dialog
    End If
    ' This could be extended to do Edit>Edit Message and paste the headers into the body.
    End Sub</pre>

    This merely automates what you could do yourself.

  8. #8
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Brookline, Massachusetts, USA
    Posts
    606
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Re: e-mail header (OXP SP2)

    Wow, what a Pandora's box I opened. As a long-time Eudora user I marvel at the complexity required to make Outlook do something that Eudora does out of the box. I realize that a lot of users don't want to see the header, but a simple Yes/No switch would seem to be far simpler. Ah, but it's Microsoft, so nothing is ever simple.
    Anyway, thanks for the info.
    Howard

  9. #9
    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: e-mail header (OXP SP2)

    Since Outlook evolved from a non-Internet-aware mail application, and still is designed largely as a front end to Exchange Server, you can see how this extra bit of information was never viewed as important and was just stashed away in a dark corner. I agree that this is an obsolete way to handle it, but...

  10. #10
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Brookline, Massachusetts, USA
    Posts
    606
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Re: e-mail header (OXP SP2)

    Thanks for the explanation of Outlook's evolution. I'm getting more Outlook oriented every day.

Posting Permissions

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