Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Word-Based Samples
 Word Document Protection Techniques...
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0)
Word Document Protection Techniques Sample

Updated: November 2007

Note:

This sample runs only in Microsoft Office Word 2007.

This sample demonstrates various techniques you can use to protect structural components of a document. These techniques can help to prevent users from accidentally deleting controls or otherwise changing important parts of your solution document.

Security Note:

This sample code is intended to illustrate a concept, and it shows only the code that is relevant to that concept. It may not meet the security requirements for a specific environment, and it should not be used exactly as shown. We recommend that you add security and error-handling code to make your projects more secure and robust. Microsoft provides this sample code "AS IS" with no warranties.

For information about installing the sample project on your computer, see How to: Install and Use Sample Files Found in Help.

Download sample

To run this sample

  1. Press F5.

  2. Follow the instructions in the document.

  • How to protect an XML tag so that it cannot be deleted by the user, but is accessible to code and manual interaction.

  • How to protect a Bookmark control so that if a user deletes it, it is re-created.

  • How to protect a Windows Forms control so that it cannot be modified or deleted by the user, but can be accessed by your code.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker