Export (0) Print
Expand All
Expand Minimize

Workbook.RemoveCustomization Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Removes the customization that was created by using Office development tools in Visual Studio from the workbook.

Namespace:  Microsoft.Office.Tools.Excel
Assemblies:   Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

void RemoveCustomization()

ExceptionCondition
CannotRemoveCustomizationException

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

UnauthorizedAccessException

The document is protected.

This method removes the customization by performing the following tasks:

  • It deletes the _AssemblyName and _AssemblyLocation custom properties from the workbook. For more information, see Custom Document Properties Overview.

  • It deletes the cached data from the workbook. For more information about cached data, see Caching Data.

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

Show:
© 2014 Microsoft