Contents Collection

The Contents collection contains all content files. The collection can be used to determine the value of a specific content item, or to iterate through the collection and retrieve a list of all items in the message.

Syntax

Content = Object.Contents(key|index)

Parameters
key
The name of the content to retrieve.
index
An index offset indicating which item in the list to return. The index starts at 0
Return Value

Returns a Content Object

Example

In the following example, a specific content is removed on the Mail_OnStartRender event

Sub Mail_OnStartRender
    If Record.Fields("Details") = False Then
        Mail.Contents.Remove("Details")
    End If
End Sub

Applies To

Mail Object, Mailing Object

See Also

Content Object