Share via


Document.ServerPolicy Property (2007 System)

Gets the policy that is specified for the document, when the document is stored on a server that is running Microsoft Office SharePoint Server 2007.

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 ServerPolicy As ServerPolicy
'Usage
Dim instance As Document 
Dim value As ServerPolicy 

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

Property Value

Type: ServerPolicy
A ServerPolicy object that represents the policy that is specified for the document, when the document is stored on a server that is running Microsoft Office SharePoint Server 2007.

Examples

The following code example retrieves the information management policy that is associated with the current document and displays the policy name, description, and statement. To run this example, you must publish the document to a Microsoft Office SharePoint Server 2007 site and define an information management policy in the site.

This example is for a document-level customization.

Private Sub GetInformationManagementPolicy()
    Dim policy As Office.ServerPolicy = Me.ServerPolicy
    MessageBox.Show("Information Management Policy: " + policy.Name _
        + vbCrLf + "Description: " + policy.Description _
        + vbCrLf + "Statement: " + policy.Statement)
End Sub
private void GetInformationManagementPolicy()
{            
    Office.ServerPolicy policy = this.ServerPolicy;
    MessageBox.Show("Information Management Policy: " + policy.Name 
        + "\r\nDescription: " + policy.Description 
        + "\r\nStatement: " + policy.Statement);
}

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace