David
David

Reputation: 668

How to edit customUI (add context menu button) in office add-in

Hi I just created a office add-in to search acronym' meanings in an API. I need to allow the user to search it directly by the document selecting some text and right click on it and pressing a button on the context menu.

I have tried creating a customUI14.xml file to edit the context menu of the document but I don't really know if I can add it to the add-in and how to do it.

I'm developing it using visual studio 2017 with the official office developer tools.

This is an example of what I need:

Context menu

searchs on add-in

Upvotes: 2

Views: 1682

Answers (1)

Kim Brandl
Kim Brandl

Reputation: 13480

You can implement the functionality that you've described by creating add-in commands, which can be achieved by customizing your add-in's manifest XML file. This article in the docs describes how to do this: Create add-in commands in your manifest for Excel, Word, and PowerPoint. In particular, Step 6: Add ExtensionPoint elements in the article is especially relevant to your scenario, including (especially) the Menu controls subsection within Step 6.

If you haven't already done so, I'd suggest that you review the article that I've linked to above. If you run into issues when you attempt to implement add-in commands for your add-in, please post specifics about your issue here on SO.

Upvotes: 4

Related Questions