Loud Software
Loud Software

Reputation: 77

VSTO with multiple ribbon XML files

I'm trying to create a VSTO Add-in for word that has a button in the ribbon and also a custom button in the context menu.

I know you can add multiple Ribbon XML files for outlook using different ribbonIds but AFAIK word only has one context.

Upvotes: 0

Views: 775

Answers (1)

Eugene Astafiev
Eugene Astafiev

Reputation: 49395

You are right, Word unlike Outlook doesn't differentiate ribbon contexts. You must return a single XML markup at once.

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.

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.

Anyway, you need to make sure that you have:

  1. A correct namespace declared:

    http://schemas.microsoft.com/office/2009/07/customui

  2. A child XML inside the customUI element contains the declaration of contextMenus.

Upvotes: 1

Related Questions