UserName Property

       

Specifies the account user name, or the Profile to be used to establish a session.

Syntax

object.UserName [ = value ]

The UserName property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value A string expression specifying the user account.

Remarks

On computers that have Microsoft Exchange or Microsoft Outlook installed, this property sets the Profile to be used when establishing a session. Profiles include the actual user name and password to be used. New profiles are set up by clicking on the Mail and Fax icon in the Windows Control Panel.

On computers that use Microsoft Mail, this property contains the name of the user account desired for sign-on or sign-off. If the LogonUI property is True, an empty string in the UserName property indicates that a sign-on dialog box with an empty name field should be generated. The default is an empty string.

Data Type

String