Share via


DocumentBase.SharedWorkspace Property

Gets a SharedWorkspace that represents the Document Workspace in which the document is located.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Syntax

'Declaration
Public ReadOnly Property SharedWorkspace As SharedWorkspace
public SharedWorkspace SharedWorkspace { get; }

Property Value

Type: SharedWorkspace
A SharedWorkspace that represents the Document Workspace in which the document is located.

Examples

The following code example returns a reference to the Document Workspace in which the document is stored. This example assumes that the document belongs to a Document Workspace. To use this example, run it from the ThisDocument class in a document-level project.

Private Sub DocumentSharedWorkspace()
    Dim workspace As Office.SharedWorkspace
    workspace = Me.SharedWorkspace
End Sub
private void DocumentSharedWorkspace()
{
    Office.SharedWorkspace workspace;
    workspace = this.SharedWorkspace;
}

.NET Framework Security

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace