This documentation is archived and is not being maintained.

Protecting an XML Document [Word 2003 XML Reference] --  Microsoft Office Word 2003 XML Software Development Kit

Office 2003

Protecting an XML Document [Word 2003 XML Reference]

Preventing accidental deletion of XML elements

If you want users to be able to edit the contents of XML elements inside a Microsoft© Office Word 2003 document without accidentally moving or deleting the XML tags, you can use the document protection features in Office Word 2003 to make only the content of the XML elements available for editing, and not the tags themselves.

  1. In the XML Structure task pane, select the Show XML tags in the document check box.
  2. On the Tools menu, click Protect Document.
  3. In the Protect Document task pane (see Figure 1), select the Allow only this type of editing in the document check box, and then select No changes (Read only).
  4. In the document, select the contents of an element.

    Note  If an element has placeholder text that you want to be editable, then select both the tag's contents and start tag (instead of just its contents). For more information on placeholder text see Adding XML Attributes.

  5. In the Protect Document task pane, select the Everyone check box in the Exceptions (optional) section.
  6. Repeat steps 4 and 5 for each XML tag that contains data you want users to edit.
  7. Click Yes, Start Enforcing Protection.
  8. Do one of the following:
    • To assign a password to the document so that users who know the password can remove the protection, type a password in the Enter new password (optional) box, and then confirm the password.
    • To encrypt the document so that only authenticated owners of the document can remove the protection, click User authentication.
Protect Document task pane

Figure 1. The Protect Document task pane.

More Information

For more information on the option settings used to configure the XML features in Word, see Understanding XML Options. For suggestions on troubleshooting problems that may occur while using these features, see Troubleshooting XML Documents in Word.

For additional information and examples that describe or demonstrate the end-to-end process of working with XML documents in Microsoft Office Word 2003, please see the following articles:

Editing XML Data with Microsoft Office Word 2003 and Microsoft Office Excel 2003
Creating and Applying an XML Resume Template in Microsoft Office Word 2003
Microsoft Office Word 2003 XML: Memo Styles Sample
XML and Microsoft Office Word 2003: Writing a Trip Report

©2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: