• View Source (Outlook 2003 )

    Author
    Topic
    #409558

    Am currently not using the Preview Pane. I’d like to be able to use the ‘View Source’ feature in Outlook 2003 to get a quick look at some of my more questionable mail (i.e., possible spam) without actually opening the message. This can be done easily in OE 6 by simply right-clicking the unopened message. Is there a way to view the source of an unopened message in Outlook 2003?

    Viewing 3 reply threads
    Author
    Replies
    • #873780

      I believe you’re looking to find Right-click and hit Options.

      • #873784

        That will allow me to see the full headers, but not the message itself. Is there a way of viewing the headers and the message source code?

      • #873785

        That will allow me to see the full headers, but not the message itself. Is there a way of viewing the headers and the message source code?

    • #873781

      I believe you’re looking to find Right-click and hit Options.

    • #873786

      There is no built-in way to pre-preview a message in Outlook in versions 2000 or 2002; if there is a new way to do it in 2003, I wouldn’t know. But you can choose to view HTML messages without pulling linked images, which at least minimizes the “phone home” aspect of the problem (as well as shielding you to some extent from particularly nasty images).

      I wrote my own previewer, which has gone through a number of changes over the past year. It’s far more complicated that you need to simply view the source. I think a macro like this would do that. I’ve used the Outlook Note feature to display the source because it has a much larger capacity than a Message Box (the kind used to display short messages and the OK and Cancel buttons), but is faster to display than Notepad.

      Sub ViewSource()
      ' Jefferson Scher 6 Sept 2004
      ' Display HTML source (for all body types) of selected messages
      '  as Outlook Notes - do not use on large messages
      ' Create reference to selected items and make sure they are mail
      Dim selActive As Outlook.Selection, msg As Outlook.MailItem
      Set selActive = ActiveExplorer.Selection
      If selActive(1).Class  olMail Then
          MsgBox "For mail items only.", vbExclamation + vbOKOnly
          Set selActive = Nothing
          Exit Sub
      End If
      ' Loop through selected items and throw up notes
      Dim note As Outlook.NoteItem, intNoteCount As Integer
      For Each msg In selActive
          Set note = CreateItem(olNoteItem)
          With note
              .Width = 600
              .Height = 500
              .Body = "Subject = " & msg.Subject & vbCrLf & _
                      "Format = Unknown; Source = " & vbCrLf & vbCrLf & _
                      msg.HTMLBody
              ' Cascade display for easier reference
              .Left = 10 + (intNoteCount * 20)
              .Top = 20 + (intNoteCount * 40)
              intNoteCount = intNoteCount + 1
              .Display
          End With
          Set note = Nothing
      Next
      ' Clean up objects
      If Not (msg Is Nothing) Then Set msg = Nothing
      If Not (selActive Is Nothing) Then Set selActive = Nothing
      End Sub

      You would need to add a button for this on the menu bar or a toolbar to make it convenient to use. (Unfortunately, at least in versions 2000-2002, there is no way to customize the right-click menu.)

      This macro does have a serious flaw: Outlook makes it difficult to ascertain the format of the body before it is displayed, so the macro simply assumes that all are HTML and displays the “HTMLBody” of the message. In the case of a plain text message, you will see a body that Outlook as generated on the fly. There are a number of way to try to figure out the true nature of the message, but none that I can do on a holiday. smile Hope this helps.

      • #873854

        Thanks, I’ll give it a try. The code looks good. Making a button won’t be too tough. Thanks again.

      • #873855

        Thanks, I’ll give it a try. The code looks good. Making a button won’t be too tough. Thanks again.

    • #873787

      There is no built-in way to pre-preview a message in Outlook in versions 2000 or 2002; if there is a new way to do it in 2003, I wouldn’t know. But you can choose to view HTML messages without pulling linked images, which at least minimizes the “phone home” aspect of the problem (as well as shielding you to some extent from particularly nasty images).

      I wrote my own previewer, which has gone through a number of changes over the past year. It’s far more complicated that you need to simply view the source. I think a macro like this would do that. I’ve used the Outlook Note feature to display the source because it has a much larger capacity than a Message Box (the kind used to display short messages and the OK and Cancel buttons), but is faster to display than Notepad.

      Sub ViewSource()
      ' Jefferson Scher 6 Sept 2004
      ' Display HTML source (for all body types) of selected messages
      '  as Outlook Notes - do not use on large messages
      ' Create reference to selected items and make sure they are mail
      Dim selActive As Outlook.Selection, msg As Outlook.MailItem
      Set selActive = ActiveExplorer.Selection
      If selActive(1).Class  olMail Then
          MsgBox "For mail items only.", vbExclamation + vbOKOnly
          Set selActive = Nothing
          Exit Sub
      End If
      ' Loop through selected items and throw up notes
      Dim note As Outlook.NoteItem, intNoteCount As Integer
      For Each msg In selActive
          Set note = CreateItem(olNoteItem)
          With note
              .Width = 600
              .Height = 500
              .Body = "Subject = " & msg.Subject & vbCrLf & _
                      "Format = Unknown; Source = " & vbCrLf & vbCrLf & _
                      msg.HTMLBody
              ' Cascade display for easier reference
              .Left = 10 + (intNoteCount * 20)
              .Top = 20 + (intNoteCount * 40)
              intNoteCount = intNoteCount + 1
              .Display
          End With
          Set note = Nothing
      Next
      ' Clean up objects
      If Not (msg Is Nothing) Then Set msg = Nothing
      If Not (selActive Is Nothing) Then Set selActive = Nothing
      End Sub

      You would need to add a button for this on the menu bar or a toolbar to make it convenient to use. (Unfortunately, at least in versions 2000-2002, there is no way to customize the right-click menu.)

      This macro does have a serious flaw: Outlook makes it difficult to ascertain the format of the body before it is displayed, so the macro simply assumes that all are HTML and displays the “HTMLBody” of the message. In the case of a plain text message, you will see a body that Outlook as generated on the fly. There are a number of way to try to figure out the true nature of the message, but none that I can do on a holiday. smile Hope this helps.

    Viewing 3 reply threads
    Reply To: View Source (Outlook 2003 )

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: