共用方式為


How to: Show Add-in user interface errors

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

By default, if a VSTO Add-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom ribbon does not appear, or why a ribbon appears but no controls appear.

Applies to: The information in this topic applies to document-level projects and VSTO Add-in projects for the following applications: Excel; InfoPath 2013 and InfoPath 2010; Outlook; PowerPoint; Project; Visio; Word. For more information, see Features available by Office application and project type.

To show VSTO Add-in user interface errors

  1. Start the application.

  2. Click the File tab.

  3. Click Options.

  4. In the categories pane, click Advanced.

  5. In the details pane, select Show VSTO Add-in user interface errors, and then click OK.

    Note

    For Outlook, the Show VSTO Add-in user interface errors checkbox is located in the Developer section of the details pane. For other applications, the checkbox is located in the General section of the details pane.

See also