Share via


menuitem element

The menuitem element specifies the menu item created to execute the add-in, or to make the panel visible if it is a panel add-in. This element is optional but is recommended for panels.

For a complete list of the existing menu items, see MENU names.

Note

A JavaScript add-in cannot create a new menu or submenu.

Attributes

The menuitem element has the following attributes:

label

label="label" [required]

The label attribute specifies the text appearing on the parent menu used to execute the add-in.

parent

parent="menu name" [required]

The parent attribute specifies the main application menu to which this menu item is attached, and menu name is the internal name of the menu, in the format "MENU_Name" (for example, MENU_File, MENU_Edit, MENU_Insert).

before

before="menu item" [optional]

The before attribute specifies the menu item before which the add-in menu item is inserted, and menu item is the internal name of the menu, in the format "MENU_Name" (for example, MENU_File_Save, MENU_Edit_Paste).

imagesrc

imagesrc="image filename" [optional]

The imagesrc attribute specifies the name of the icon file used to represent this command on the referenced menu. Icons should be 16x16 pixels in either PNG or JPG format.

tooltip

tooltip="text" [optional]

The tooltip attribute specifies the tooltip text that is displayed when the user moves the pointer over the menu item.

See Also

Concepts

menuitem element
MENU names
toolbaritem element

Other Resources

The add-in manifest

  Copyright © 2011 by Microsoft Corporation. All rights reserved.