_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)

Syntax

'Declaration
ReadOnly Property UserName As String
    Get
'Usage
Dim instance As _Account
Dim value As String

value = instance.UserName
string UserName { get; }

Property Value

Type: System.String

Remarks

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.

See Also

Reference

_Account Interface

_Account Members

Microsoft.Office.Interop.Outlook Namespace