The following example enumerates all of the headers in the main
part of the current message and adds them to a listbox:
Dim strHeader As String, strValue As String
Dim bResult As boolean
bResult = MailMessage1.GetFirstHeader(strHeader, strValue)
Do While bResult
List1.AddItem strHeader & ": " & strValue
bResult = MailMessage1.GetNextHeader(strHeader, strValue)
Loop