MailItem.SenderName Property
Outlook Developer Reference |
Returns a String indicating the display name of the sender for the Outlook item. Read-only.
Syntax
expression.SenderName
expression A variable that represents a MailItem object.
Remarks
This property corresponds to the MAPI property PR_SENDER_NAME.
If you wish to retrieve the fully qualified e-mail address of the sender, use the SenderEmailAddress property.
Example
This Visual Basic for Applications (VBA) example checks if the item displayed in the topmost inspector is sent by 'Dan Wilson' with 'High' importance. If it is, then it displays a message box to the user. Before running this example, replace 'Dan Wilson' with a valid name in your address book.
Visual Basic for Applications |
---|
|
See Also