WorkbookBase.ServerPolicy Property

Definition

Gets an object that represents a policy specified for a workbook that is stored on a server running Microsoft Office SharePoint Server.

public:
 property Microsoft::Office::Core::ServerPolicy ^ ServerPolicy { Microsoft::Office::Core::ServerPolicy ^ get(); };
public Microsoft.Office.Core.ServerPolicy ServerPolicy { get; }
member this.ServerPolicy : Microsoft.Office.Core.ServerPolicy
Public ReadOnly Property ServerPolicy As ServerPolicy

Property Value

A Microsoft.Office.Core.ServerPolicy object that represents a policy specified for a workbook that is stored on a server running SharePoint Server.

Remarks

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

This example is for a document-level customization.

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

Applies to