Share via


documentProtection element [Word 2003 XML Reference] --  Microsoft Office Word 2003 XML Software Development Kit

documentProtection element [Word 2003 XML Reference]

Helps prevent unintentional changes to all or part of an online form or document, as specified (Protect Document option).

Usage

<documentProtection
    edit="docProtectValue"
    formatting="onOffType"
    enforcement="onOffType"
    unprotectPassword="longHexNumberType"
/>

Element Information

Element type docProtectProperty
Namespace http://schemas.microsoft.com/office/word/2003/wordml
Schema name XML Document 2003

Elements and Attributes

Parent Elements

Element Description
docPr Represents the document properties.

Child Elements

None.

Attributes

Attribute Type Required Description Possible Values
edit docProtectValue optional Gets or sets editing restrictions. Helps prevent unintentional editing changes as specified.
  • none
  • read-only
  • comments
  • tracked-changes
  • forms
formatting onOffType optional Gets or sets formatting restrictions. Prevents unintentional formatting changes except as allowed. This setting does not have an effect unless the formattingEnabled attribute is on.
  • on
  • off
enforcement onOffType optional Gets or sets whether the specified restrictions are currently being enforced for this document.
  • on
  • off
unprotectPassword longHexNumberType optional Gets or sets password key to unprotect this document from unintentional formatting/editing changes. This password is not secure.

length = 4

Definition

<xsd:element name="documentProtection" type="docProtectProperty" minOccurs="0" >
</xsd:element>

©2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp