Get headers from email in outlook

To get headers from an email in Outlook, you can use the following methods:

Method 1: Using the Outlook UI

  1. Open the email you want to view the headers for in Outlook.
  2. Click on the "View" tab in the ribbon.
  3. Click on "View Settings" in the "View" group.
  4. Click on "Other Settings" in the "View Settings" dialog box.
  5. Scroll down to the "Headers" section and check the box next to "Show headers".
  6. Click "OK" to close the dialog box.

The email headers will now be displayed at the top of the email message.

Method 2: Using the Outlook VBA Editor

  1. Open the Outlook VBA Editor by pressing "Alt + F11" or by navigating to "Developer" tab in the ribbon and clicking on "Visual Basic".
  2. In the VBA Editor, navigate to the "ThisOutlookSession" module.
  3. Create a new subroutine by clicking "Insert" > "Module" and then typing the following code:
    Sub GetEmailHeaders()
     Dim olItem As Object
     Set olItem = Application.ActiveExplorer.Selection.Item(1)
     MsgBox olItem.Headers
    End Sub
  4. Replace Application.ActiveExplorer.Selection.Item(1) with the email you want to view the headers for.
  5. Run the subroutine by clicking "Run" or pressing "F5".

The email headers will be displayed in a message box.

Method 3: Using PowerShell

  1. Open PowerShell and navigate to the Outlook folder:
    cd $env:USERPROFILE\AppData\Roaming\Microsoft\Outlook
  2. Run the following command to get the headers of the currently selected email:
    Get-Item -Path (Get-Process -Name outlook | Get-Item -Path Property -Name MainWindowTitle).MainWindowTitle | Select-Object -ExpandProperty Headers

    Note: This method requires PowerShell 3 or later.

Method 4: Using a third-party add-in

There are several third-party add-ins available that can help you view email headers in Outlook, such as Header Analyzer or Email Header Viewer. These add-ins can provide more advanced features and functionality than the built-in methods.