Share via


SharedWorkspaceMember Object

SharedWorkspace
SharedWorkspaceMembers
SharedWorkspaceMember

The SharedWorkspaceMember object represents a user who has rights in a shared document workspace. Member of the SharedWorkspaceMembers collection.

Using the SharedWorkspaceMember Object

Use the SharedWorkspaceMember object to manage users who have rights to participate in a shared workspace and to collaborate on the shared document(s) saved in the workspace.

The Rolespecified when the user is added as a member of the workspace (for example, "Reader" or "Contributor") determines that user's rights in the workspace and cannot be accessed or modified later through properties of the SharedWorkspaceMember object.

Use the Item(Index) property of the SharedWorkspaceMembers collection to return a specific SharedWorkspaceMember object.

Use the SharedWorkspaceMember object's 3 distinct name properties to retrieve identifying information about the member.

  • the Name property returns the members display name or friendly name;
  • the Email property returns the member's email address; and,
  • the DomainName property returns the member's domain and user name in the format domain\user.

The following example displays the number of members in the active document's shared workspace, along with their names, domain user names, and email addresses.

    Dim swsMember As Office.SharedWorkspaceMember
    Dim strMemberInfo As String
    strMemberInfo = "The shared workspace contains " & _
        ActiveWorkbook.SharedWorkspace.Members.Count & " member(s)." & vbCrLf
    If ActiveWorkbook.SharedWorkspace.Members.Count > 0 Then
        For Each swsMember In ActiveWorkbook.SharedWorkspace.Members
            strMemberInfo = strMemberInfo & swsMember.Name & vbCrLf & _
                " - " & swsMember.DomainName & vbCrLf & _
                " - " & swsMember.Email & vbCrLf
        Next
    End If
    MsgBox strMemberInfo, vbInformation + vbOKOnly, _
        "Members in Shared Workspace"
    Set swsMember = Nothing

Properties | Application Property | Creator Property | DomainName Property | Email Property | Name Property | Parent Property

Methods | Delete Method

Parent Objects | SharedWorkspace

Child Objects