DocumentBase.ServerPolicy Property

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

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 ServerPolicy As ServerPolicy
    Get
public ServerPolicy ServerPolicy { get; }

Property Value

Type: Microsoft.Office.Core.ServerPolicy
A Microsoft.Office.Core.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.

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 site and define an information management policy in the site. To use this example, run it from the ThisDocument class in a document-level project.

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

DocumentBase Class

Microsoft.Office.Tools.Word Namespace