Subject Property (CDONTS Message Object)

The Subject property returns or sets the subject of the message as a string. Read/write (read-only for a message in the Inbox).

Syntax

objMessage.Subject 
 

The Subject property is the default property of a Message object, meaning that objMessage is syntactically equivalent to objMessage.Subject in Microsoft® Visual Basic® code.

Data Type

String

Remarks

You can set the Subject property to an empty string, although that limits the ability of the recipients to sort and filter received messages.

Example

This code fragment sets the subject of a message:

Dim objMessage As Message ' assume valid message 
objMessage.Subject = "Test message" 
 

See Also

Text Property (Message Object)