Email Property
Returns the email name of the specified SharedWorkspaceMember in the format [email protected]
. Read-only String.
expression.Email
expression Required. 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 "mycompany.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 = "mycompany.com" Then
strMemberList = strMemberList & swsMember.Email & vbCrLf
End If
Next
MsgBox strMemberList, vbInformation + vbOKOnly, _
"Members with mycompany.com Email"
Set swsMember = Nothing