Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
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
- 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.