SharedWorkspaceMember.Email property (Office)

Gets the email name of the specified SharedWorkspaceMember in the format user@domain.com. Read-only.

Note

Beginning with Microsoft Office 2010, this object or member has been deprecated and should not be used.

Syntax

expression.Email

expression An expression that returns a SharedWorkspaceMember object.

Example

The following example extracts the email domain name from the Email property of each shared workspace member and lists members who have email addresses at the "example.com" domain.

Dim swsMember As Office.SharedWorkspaceMember 
    Dim strEmailDomain As String 
    Dim strMemberList As String 
    For Each swsMember In ActiveWorkbook.SharedWorkspace.Members 
        strEmailDomain = LCase(Right(swsMember.Email, _ 
            Len(swsMember.Email) - InStr(swsMember.Email, "@"))) 
        If strEmailDomain = "example.com" Then 
            strMemberList = strMemberList & swsMember.Email & vbCrLf 
        End If 
    Next 
    MsgBox strMemberList, vbInformation + vbOKOnly, _ 
        "Members with example.com email" 
    Set swsMember = Nothing

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.