Share via


Document.RemoveCustomization Method (2007 System)

Removes the Visual Studio Tools for Office customization from the document.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
Public Sub RemoveCustomization
'Usage
Dim instance As Document

instance.RemoveCustomization()
public void RemoveCustomization()
public:
void RemoveCustomization()
public function RemoveCustomization()

Exceptions

Exception Condition
CannotRemoveCustomizationException

The custom document properties or the cached data could not be removed from the document.

UnauthorizedAccessException

The document is protected.

Remarks

This method removes the customization by performing the following tasks:

This method might throw an UnauthorizedAccessException if the document is protected. You should remove any protection from the document before calling this method.

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace

Other Resources

How to: Remove Managed Code Extensions from Documents (2007 System)

Custom Document Properties Overview

Caching Data Objects