Message Object (CDONTS Library)
Message Object (CDONTS Library)
The Message object represents a single message, item, document, or form in a folder.
At a Glance
Specified in type library: |
CDONTS.DLL |
First available in: |
CDO for NTS Library version 1.2 |
Parent objects: |
Messages collection |
Child objects: |
AddressEntry (only obtainable through Sender property of Message object) Attachments collection Recipients collection |
Default property: |
No modifications are permitted to messages in the Inbox, except for message deletion. Therefore, all properties on a Message object are treated as read-only when the message is in the Inbox. When the access is described as read/write in the following table, that access applies only to messages in the Outbox.
Note
In compliance with RFC 2557, Microsoft Exchange 2000 Server and later versions no longer emit Content-Base headers. Therefore, using the ContentBase setting will not result in the Content-Base header being set in the message represented by this Message object.
Properties
Name |
Available since version |
Type |
Access |
1.2 |
String |
Read-only |
|
1.2 |
Attachment object or Attachments collection object |
Read-only |
|
1.2 |
Long |
Read-only |
|
1.2 |
String |
Read/write |
|
1.2 |
String |
Read-only |
|
1.2 |
String |
Read/write |
|
1.2 |
IStream object or String |
Read/write |
|
1.2 |
Long |
Read/write |
|
1.2 |
Long |
Write-only |
|
1.2 |
Messages collection object |
Read-only |
|
1.2 |
Recipient object or Recipients collection object |
Read-only |
|
1.2 |
AddressEntry object |
Read-only |
|
1.2 |
Session object |
Read-only |
|
1.2 |
Long |
Read-only |
|
1.2 |
String |
Read/write |
|
1.2 |
IStream object or String |
Read/write |
|
1.2 |
Variant (vbDate format) |
Read-only |
|
1.2 |
Variant (vbDate format) |
Read-only |
Methods
Name |
Available since version |
Parameters |
1.2 |
(none) |
|
1.2 |
(none) |
Remarks
Microsoft® Visual Basic® programmers can create new Message objects using the Messages collection's Add method.
A message can be obtained from its parent Messages collection using the collection's Item property. To get to the Messages collection in a folder, use the Folder object's Messages property.
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 changing any attachment; adding, deleting, or changing any recipient; and writing to any message property, even one with read/write access.