Export (0) Print
Expand All

Office Menus in the Visual Studio Environment

Note Required applications

The features in this topic are available only if you have the required applications installed.

For more information, see Features Available by Product Combination.

  • One of these development environments:

    VSTO 2005

    -or-

    Visual Studio Team System

  • Microsoft Office 2003

When you open a document inside Visual Studio, the Microsoft Office Word 2003 and Microsoft Office Excel 2003 application environment is integrated into the Visual Studio designer. You can work with the features of each application to design the look of your document at the same time that you write managed code to extend its capabilities. The menus that belong to Word or Excel merge with the Visual Studio menus, and are accessible from the Visual Studio menu bar.

Office Menu Items

You must select the document to give it focus before the Word or Excel menu items appear in the Visual Studio menus. If another part of Visual Studio has focus, for example Solution Explorer or the Properties window, the Office document menu items are not available.

Some menus, such as Tools and View, contain many items that are important to have available for both Visual Studio and Office at the same time. To make menu navigation easier, the Office menu items are all placed in a separate submenu, accessible from the top of the corresponding Visual Studio menu. Other menus, such as File, only present certain options that can be performed within the Visual Studio environment, and do not make all the Office menu items available. If a menu shortcut key is duplicated on the Visual Studio and Office menus, you can toggle between them by holding down the ALT key and pressing the shortcut letter repeatedly.

You cannot customize the Word and Excel menus while in the Visual Studio environment.

The merged menus look slightly different from the usual Visual Studio and Office menus. This is because merged menus cannot present the customized appearance that both Visual Studio and Office are capable of presenting.

Shortcut Menus

Shortcut menus provided by the Office application are available when the document is open in the Visual Studio environment, with the addition of a View Code shortcut menu item that opens the Code Editor.

Keyboard Shortcut Mapping

Keyboard shortcut mapping defaults to the Visual Studio mapping, but you can include Office mappings by changing the setting in the Options dialog box on the Tools menu. The setting is under the Microsoft Office Keyboard Settings node, under Microsoft Office Excel Keyboard or Microsoft Office Word Keyboard. Visual Studio Tools for Office also adds a toolbar to Visual Studio with a button that enables you to switch between the mapping options. The ToolTip text reads Switch to Excel Keyboard Scheme or Switch to Visual Studio Keyboard Scheme, depending on which option is currently enabled.

When you set this option in the Options dialog box, it becomes the default for all projects. However, any change will not take effect until after you close and reopen the project that is open while you make the change. If you use the toolbar button to change the setting, the change takes place immediately, but it only affects the current work session. If you close and reopen the project that is open while you make the change, or if you start a new project, the setting reverts to the default as set in the Options dialog box. In other words, use the toolbar button to make temporary changes to the keyboard settings, and use the Options dialog box to change the default behavior.

Embedded and Linked Objects

Documents that contain embedded or linked objects can be opened in Visual Studio. Selecting an embedded or linked object causes the menus to change to those of the selected object. However, there are no tools or support for customizing embedded or linked objects.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft