Dela via


Document.SharedWorkspace Property (2007 System)

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

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property SharedWorkspace As SharedWorkspace
'Usage
Dim instance As Document 
Dim value As SharedWorkspace 

value = instance.SharedWorkspace
[BrowsableAttribute(false)]
public SharedWorkspace SharedWorkspace { get; }
[BrowsableAttribute(false)]
public:
property SharedWorkspace^ SharedWorkspace {
    SharedWorkspace^ get ();
}
public function get SharedWorkspace () : SharedWorkspace

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.

This example is for a document-level customization.

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

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace