This documentation is archived and is not being maintained.

_Account.UserName Property

Returns a String (string in C#) representing the user name for the Account. Read-only.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

[DispIdAttribute()]
string UserName { get; }

Property Value

Type: System.String

The purpose of _Account.SmtpAddress and UserName is to provide an account-based context to determine identity.

If the account does not have a user name defined, UserName returns an empty string.

Show: