Udostępnij za pośrednictwem


Workbook.ServerPolicy Property (2007 System)

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

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property ServerPolicy As ServerPolicy
'Usage
Dim instance As Workbook 
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 Microsoft.Office.Core.ServerPolicy object that represents a policy specified for a workbook that is stored on a server running SharePoint Server 2007.

Examples

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 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

Workbook Class

Workbook Members

Microsoft.Office.Tools.Excel Namespace