Поделиться через


How to: Customize the Microsoft Office Menu

You can use the Ribbon Designer to add controls to the menu that opens when you click the File tab (for Office 2010) or the Microsoft Office Button (for Office 2007).

For Office 2010 projects, controls that you add to the File tab appear in a group named Add-ins.

For Office 2007 projects, you can position controls next to any built-in control. A built-in control is a control that is already on the Microsoft Office Menu. For example, you can position a control next to the Save button. For more information, see Ribbon Designer.

For Office 2010 projects, you cannot position controls before or after built-in controls by using the Ribbon designer in Visual Studio. If you want to position controls before or after built-in controls, you must use a Ribbon XML. For more information, see Office UI Customization.

Applies to: The information in this topic applies to document-level projects and application-level projects for the following applications: Excel 2007 and Excel 2010; InfoPath 2010; Outlook 2007 and Outlook 2010; PowerPoint 2007 and PowerPoint 2010; Project 2010; Visio 2010; Word 2007 and Word 2010. For more information, see Features Available by Office Application and Project Type.

To add controls to the Microsoft Office Menu

  1. Open the Ribbon item in Design view.

    For information about how to add a Ribbon (Visual Designer) item to your project, see How to: Get Started Customizing the Ribbon.

  2. In the Ribbon Designer, click the File tab (for Microsoft Office 2010) or the Microsoft Office Button (for the 2007 Microsoft Office system).

    A menu designer appears. This design surface does not contain any controls.

  3. From the Office Ribbon Controls tab of the Toolbox, drag any of the following controls onto the menu designer:

    • Button

    • CheckBox

    • Gallery

    • Menu

    • Separator

    • SplitButton

    • ToggleButton

  4. Drag controls to move them to new positions on the menu.

To position a control before or after a built-in control in the Microsoft Office Menu

  1. In the menu designer, select a control.

  2. In the Properties window, expand the Position property.

  3. In the drop-down list next to the PositionType property, select BeforeOfficeId or AfterOfficeId.

    The OfficeId property appears under Position.

  4. Set the OfficeId property to the ID of the built in control. For a list of control IDs, download 2007 Office System Document: Lists of Control IDs from the Microsoft Download Center.

    Note

    For Office 2010 projects, you cannot position controls by using the Ribbon designer in Visual Studio. If you want to position controls, you must use Ribbon XML. For more information, see Office UI Customization.

See Also

Tasks

How to: Get Started Customizing the Ribbon

Walkthrough: Creating a Custom Tab by Using the Ribbon Designer

Concepts

Ribbon Designer

Ribbon XML

Other Resources

Ribbon Overview

Change History

Date

History

Reason

April 2011

Clarified how to use the Ribbon Designer to add controls to the File Menu for Office 2010 projects.

Customer feedback.