GetNextHeader Method

Return the next header in the current message part.

Syntax

object.GetNextHeader( Header, Value )

The GetNextHeader method syntax has the following parts:

Part Description
object An object expression that evaluates to an InternetMail object.
header A string which will contain the name of the header field.
value A string which will contain the value of the header field.

Return Type

Boolean

Remarks

The GetNextHeader method allows an application to enumerate all of the headers in the current message. When all of the headers in the current message part have been returned, this method will return False.

Example

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 = InternetMail1.GetFirstHeader(strHeader, strValue)
    Do While bResult
        List1.AddItem strHeader & ": " & strValue
        bResult = InternetMail1.GetNextHeader(strHeader, strValue)
    Loop

See Also

MessagePart Property, GetFirstHeader Method, GetHeader Method, SetHeader Method


Copyright © 2008 Catalyst Development Corporation. All rights reserved.