How to: Re-enable an Add-in That Has Been Disabled

How to: Re-enable an Add-in That Has Been Disabled

Applies to

The information in this topic applies only to the following project types and versions of Microsoft Office. For more information, see Features Available by Office Application and Project Type.

Project type

  • Application-level projects

Microsoft Office version

  • 2007 Microsoft Office system

  • Microsoft Office 2010

Microsoft Office applications can disable add-ins that behave unexpectedly while they are being loaded. If an application does not load your add-in when you try to debug it, the application might have hard disabled or soft disabled your add-in.

There are different processes for re-enabling add-ins, depending on the application.

Hard-Disabled Add-Ins


Hard disabling occurs when user code that runs while the add-in is loaded causes the application to close unexpectedly, and when you stop the debugger while the constructor or the Startup event handler is executing.

The procedure is different for Microsoft Office applications that use the Ribbon in the main window UI, and applications that do not use the Ribbon.

To re-enable an add-in in an application that uses the Ribbon

  1. In the application, click the File tab (for Microsoft Office 2010) or the Microsoft Office Button (for the 2007 Microsoft Office system).

  2. Click the ApplicationName Options button.

  3. In the categories pane, click Add-ins.

  4. In the details pane, verify that the add-in appears in the Disabled Application Add-ins list.

    The Name column specifies the name of the assembly, and the Location column specifies the full path of the application manifest.

  5. In the Manage box, click Disabled Items, and then click Go.[此处选择“禁止项目”,再进入管理]

  6. Select the add-in and click Enable.

  7. Click Close.

To re-enable an add-in in an application that does not use the Ribbon

  1. In the application, open the Disabled Items dialog box. For instructions, see Help for the Office application.

  2. In the categories pane, click Add-ins.

  3. Verify that the add-in assembly appears in the list.

  4. Select the add-in and click Enable.

  5. Click Close.

Soft-Disabled Add-Ins


Soft disabling occurs when an add-in throws an unhandled exception in the constructor or the E:Microsoft.Office.Tools.AddIn.Startup event handler, but the application does not unexpectedly close.

NoteNote

When you re-enable a soft-disabled add-in, the application immediately attempts to load the add-in. If the problem that initially caused the application to soft disable the add-in has not been fixed, the application will soft disable the add-in again.

The procedure is different for Microsoft Office applications that use the Ribbon in the main window UI, and applications that do not use the Ribbon.

To re-enable an add-in in an application that uses the Ribbon

  1. In the application, click the File tab (for Microsoft Office 2010) or the Microsoft Office Button (for the 2007 Microsoft Office system).

  2. Click the ApplicationName Options button.

  3. In the categories pane, click Add-ins.

  4. In the details pane, verify that the add-in appears in the Inactive Application Add-ins list.

    The Name column specifies the name of the assembly, and the Location column specifies the full path of the application manifest.

  5. In the Manage box, click COM Add-ins, and then click Go.

  6. In the COM Add-Ins dialog box, select the check box next to the disabled add-in.

  7. Click OK.

To re-enable an add-in in an application that does not use the Ribbon

  1. In the application, open the COM Add-ins dialog box. For instructions, see Help for the Office application.

  2. In the COM Add-Ins dialog box, select the check box next to the disabled add-in.

  3. Click OK.

引文来源  How to: Re-enable an Add-in That Has Been Disabled