Platform SDK: CDO 1.2.1

Messages Property (CDONTS 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 CDO for NTS Library does not permit any modifications to messages in the Inbox, other than deleting the entire message. Prohibited modifications include adding, deleting, or modifying any attachment; adding, deleting, or modifying any recipient; and modifying any message property, even one with read/write access.

Example

This code fragment shows how a Messages collection of Message objects is obtained from a folder which is in turn obtained from a Session object:

Dim objInbox as Folder 
Dim collInMessages as Messages 
' assume valid Session object 
Set objInbox = objSession.GetDefaultFolder(CdoDefaultFolderInbox) 
Set collInMessages = objInbox.Messages