Table of contents
TOC
Collapse the table of content
Expand the table of content

ServerPolicy Object (Office)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Represents a policy specified for a document type stored on a server running Microsoft Office SharePoint Server.

Remarks

The ServerPolicy object is composed of individual PolicyItem objects representing the individual policy definitions for the active document.

Example

The following example lists the name and description of all of the policy items for the active document.

Sub ListPolicyItems() 
Dim objSrvPolicy As ServerPolicy 
Dim objPolicyItem As PolicyItem 
Dim strPolicyItemList As String 

Set objSrvPolicy = ActiveDocument.ServerPolicy 

For Each objPolicyItem In objSrvPolicy 
 strPolicyItemList = "Policy Item " & objPolicyItem.Name & " - " & _ 
 objPolicyItem.Description & vbCrLf 
Next 
MsgBox (strPolicyItemList) 

End Sub 

Properties

Name
Application
BlockPreview
Count
Creator
Description
Id
Item
Name
Parent
Statement

See also

Other resources

Object Model Reference

© 2017 Microsoft