Table of contents
TOC
Collapse the table of content
Expand the table of content

SharedWorkspaceMember.Email Property (Office)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Gets the e-mail 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

Emailexpression. Email

expression An expression that returns a SharedWorkspaceMember object.

Example

The following example extracts the e-mail domain name from the Email property of each shared workspace member and lists members who have e-mail 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 e-mail" 
    Set swsMember = Nothing

See also

Concepts

SharedWorkspaceMember Object

Other resources

SharedWorkspaceMember Object Members

© 2018 Microsoft