Expand Minimize

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)

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.

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 void GetInformationManagementPolicy()
{            
    Office.ServerPolicy policy = this.ServerPolicy;
    MessageBox.Show("Information Management Policy: " + policy.Name 
        + "\r\nDescription: " + policy.Description 
        + "\r\nStatement: " + policy.Statement);
}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft