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

SharedWorkspaceMember.DomainName Property (Office)

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

Gets the domain and user name of the specified SharedWorkspaceMember in the format domain\user. Read-only.

Syntax

expression. DomainName

expression A variable that represents a SharedWorkspaceMember object.

Example

The following example extracts the domain name from the DomainName property of each shared workspace member and lists members who belong to the "MyCompany" domain.

 Dim swsMember As Office.SharedWorkspaceMember 
 Dim strDomain As String 
 Dim strMemberList As String 
 For Each swsMember In ActiveWorkbook.SharedWorkspace.Members 
 strDomain = UCase(Left(swsMember.DomainName, _ 
 InStr(swsMember.DomainName, "\") - 1)) 
 If strDomain = "MYCOMPANY" Then 
 strMemberList = strMemberList & swsMember.Name & vbCrLf 
 End If 
 Next 
 MsgBox strMemberList, vbInformation + vbOKOnly, _ 
 "Members in the MYCOMPANY Domain" 
 Set swsMember = Nothing 

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

See also

Concepts

SharedWorkspaceMember Object

Other resources

SharedWorkspaceMember Object Members

© 2018 Microsoft