OfficeDev/office-js

Menu option in Office Ribbon

Closed this issue · 14 comments

Hi,

I am looking to add menu for add-in commands. Please refer image below:
image

Is there anyway to achieve this?

Thanks

Hi @ishanig11, I found a reference: https://learn.microsoft.com/en-us/office/dev/add-ins/design/add-in-commands, hope it is helpful. Hi @m-hellesen, do you have any idea to achieve this? Thanks.

Thank you @shanshanzheng-dev . With above link I can add commands like
image
I have already implemented this through manifest file. I am looking someway to add commands as dropdown or menu using manifest file.

@shanshanzheng-dev : Thank you for sharing this code sample. I created controls similar as shown above example.
Please refer image for control definition.

I am trying this on online office version. Kindly check and let me know what is missing.

@shanshanzheng-dev : yes, I have already uploaded manifest file. I did all these steps. I see all my commands in Excel ribbon but no dropdown.

Hi @ishanig11, I download that manifest from https://github.com/OfficeDev/Office-Add-in-samples/blob/main/Samples/office-add-in-commands/excel/manifest.xml, and upload this manifest from:
image
And then, I can see the dropdown menu:
image
Or you can change this simple code to what you want?

It worked. Thank you.
Is this feature supported for Word, Powerpoint also? Also is it possible to show one command and then remaining commands as part of dropdown. Like
image
Here if use click directly on Menu, Help gets executed and other command is as part of dropdown.

Hi @ishanig11 I think it support word and powerpoint also. You can try https://github.com/OfficeDev/Office-Add-in-samples/blob/main/Samples/office-add-in-commands/word/manifest.xml and https://github.com/OfficeDev/Office-Add-in-samples/blob/main/Samples/office-add-in-commands/powerpoint/manifest.xml
But about commands as part of dropdown, I don't think so, I'll check with my team workers. If there're some updates, I'll confirm with you. Thanks.

Thank you. It worked. Is there anything for
image

Hi @ishanig11, Sorry for slow response. About commands as part of dropdown, I think we can't do this, I'll check with my team workers. If there're some updates, I'll confirm with you. Thanks.

@ishanig11 - can you help me understand the specific question? Are you looking to have an app command in the dropdown or something different?

Thank you. It worked. Is there anything for image

@EsterBergen : Along with Dropdown, I am looking for options to how pre-populated data on commands like textbox as shown in image.

HI @ishanig11 - This functionality is not currently supported. We track Office Add-in feature requests on our Microsoft 365 Developer Platform Ideas Forum. Please add your request there. Feature requests on are considered when we go through our planning process. Thanks for highlighting this!