Messages Property (Folder Object)

Messages Property (Folder Object)

The Messages property returns a Messages collection object within the folder. Read-only.

Syntax

objFolder.Messages

Data Type

Object (Messages collection)

Remarks

Although the Messages property itself is read-only, the collection it returns can be accessed in the normal manner through its Add and Delete methods, and the properties on its member Message objects retain their respective read/write or read-only accessibility.

The Messages property does not correspond to a MAPI property and cannot be rendered into HTML hypertext by the CDO Rendering Library. It could be rendered as a container object by setting the ContainerRenderer object's DataSource property to the Messages collection object returned by the Messages property.

Example

' from the QuickStart sample
' use the Messages property of the Outbox folder to add a new message
    Set objSession = CreateObject("MAPI.Session")
    objSession.Logon
    Set objMessage = objSession.Outbox.Messages.Add
 

See Also

Concepts

Folder Object