Sender Property (CDONTS Message Object)

The Sender property returns or sets the sender of a message as an AddressEntry object. Read-only.

Syntax

Set objAddrEntry = objMessage.Sender 
 
objAddrEntry
Object. The returned AddressEntry object that represents the messaging user that sent the message.
objMessage
Object. The Message object.

Data Type

Object (AddressEntry)

Example

This code fragment displays the name of the sender of a message:

' from the sample function Message_Sender 
Set objAddrEntry = objMessage.Sender 
If objAddrEntry Is Nothing Then 
   MsgBox "Could not set the AddressEntry object from the Sender" 
   Exit Function 
End If 
MsgBox "Message was sent by " & objAddrEntry.Name 
 

© 1997 by Microsoft Corporation. All rights reserved.