Protecting an XML Document [Word 2003 XML Reference] -- Microsoft Office Word 2003 XML Software Development Kit
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.
- In the XML Structure task pane, select the Show XML tags in the document check box.
- On the Tools menu, click Protect Document.
- 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).
- 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.
- In the Protect Document task pane, select the Everyone check box in the Exceptions (optional) section.
- Repeat steps 4 and 5 for each XML tag that contains data you want users to edit.
- Click Yes, Start Enforcing Protection.
- 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.
Figure 1. The Protect Document task pane.
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:
©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