Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
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: Microsoft.Office.Core.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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.