DocumentSecurity class

Office 2013 and later

Document Security. When the object is serialized out as xml, its qualified name is ap:DocSecurity.

Namespace:  DocumentFormat.OpenXml.ExtendedProperties
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

public class DocumentSecurity : OpenXmlLeafTextElement

[ISO/IEC 29500-1 1st Edition]

DocSecurity (Document Security)

This metadata element specifies the security level of a document as a numeric value. Document security is defined as:


Security Level


Document is password protected.


Document is recommended to be opened as read-only.


Document is enforced to be opened as read-only.


Document is locked for annotation.

The possible values for this element are defined by the W3C XML Schema int datatype.

Parent Elements

Properties (§

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.