Platform SDK: CDO 1.2.1

Message Object

The Message object represents a single message, item, document, or form in a folder.

At a Glance

Specified in type library: CDO.DLL
First available in: CDO Library version 1.0.a
Parent objects: Messages collection
Child objects: Attachments collection
Fields collection
Recipients collection
Default property: Subject

Properties


Name
Available since version
Type

Access
Application 1.0.a String Read-only
Attachments 1.0.a Attachment object or Attachments collection object Read-only
Categories 1.2 String array Read/write
Class 1.0.a Long Read-only
Conversation 1.0.a (Obsolete. Do not use.) Read/write
ConversationIndex 1.0.a String Read/write
ConversationTopic 1.0.a String Read/write
DeliveryReceipt 1.0.a Boolean Read/write
Encrypted 1.0.a Boolean Read/write
Fields 1.0.a Field object or Fields collection object Read-only
FolderID 1.0.a String Read-only
ID 1.0.a String Read-only
Importance 1.0.a Long Read/write
MAPIOBJECT 1.0.a IUnknown object Read/write (Note: Not available to Visual Basic applications)
Parent 1.0.a Messages collection object Read-only
ReadReceipt 1.0.a Boolean Read/write
Recipients 1.0.a Recipients object or Recipients collection object Read/write
Sender 1.0.a AddressEntry object Read/write
Sensitivity 1.2 Long Read/write
Sent 1.0.a Boolean Read/write
Session 1.0.a Session object Read-only
Signed 1.0.a Boolean Read/write
Size 1.0.a Long Read-only
StoreID 1.0.a String Read-only
Subject 1.0.a String Read/write
Submitted 1.0.a Boolean Read/write
Text 1.0.a String Read/write
TimeCreated 1.2 Variant (vbDate format) Read-only
TimeExpired 1.2 Variant (vbDate format) Read/write
TimeLastModified 1.2 Variant (vbDate format) Read-only
TimeReceived 1.0.a Variant (vbDate format) Read/write
TimeSent 1.0.a Variant (vbDate format) Read/write
Type 1.0.a String Read/write
Unread 1.0.a Boolean Read/write

Methods


Name
Available since version
Parameters
CopyTo 1.1 folderID as String,
(optional) storeID as String
Delete 1.0.a (optional) DeletedItems as Boolean
Forward 1.2 (none)
IsSameAs 1.1 objMessage2 as Object
MoveTo 1.1 folderID as String,
(optional) storeID as String
Options 1.0.a (optional) parentWindow as Long
Reply 1.2 (none)
ReplyAll 1.2 (none)
Send 1.0.a (optional) saveCopy as Boolean,
(optional) showDialog as Boolean,
(optional) parentWindow as Long
Update 1.0.a (optional) makePermanent as Boolean,
(optional) refreshObject as Boolean

Remarks

Microsoft® Visual Basic® programmers can create new Message objects using the Messages collection’s Add method.

C/C++ programmers can create new Message objects with the OLE function CoCreateInstance.

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. If you know a message’s unique identifier, you can obtain it directly from the Session object’s GetMessage method.

A Message object can be rendered into HTML hypertext using the CDO Rendering ObjectRenderer object. To specify this, set the object renderer's DataSource property to the Message object itself. The individual properties that can be rendered with the RenderProperty method are indicated in the Message object property descriptions.

A Message object can also be rendered as the parent of a Recipients collection, using the ContainerRenderer object. The individual properties that can be rendered with the RenderProperty method are indicated in the Message object property descriptions.