Updating Earlier Code for CommandBars
Outlook Developer Reference |
The Ribbon is new in the 2007 Microsoft Office system. For solutions that exist prior to this release, if your solution customizes Explorer command bars, your code should work without modification. The Explorer does not use the Ribbon, and you should continue to use the CommandBars object returned by the Explorer.CommandBars property to modify existing command bars or create custom command bars.
If you’ve already written code to customize Inspector command bars in an Outlook Add-in or Outlook 97 – 2003 custom form, you need to know what that code does in Outlook now. Don’t be alarmed, your existing code will still work. However, your Inspector command bars code will place your command bar customizations in the Add-ins tab on the Ribbon. This might be acceptable to you, or you might decide that the Add-ins tab experience is less than optimal for your command user interface. In this case, you should consider updating your code to use Ribbon extensibility.
The following list illustrates the behavior of command bar customizations in Outlook 2007.
Entry Point | Outlook Behavior |
Explorer.CommandBars | Existing code continues to work because Outlook still uses Command Bars in the Explorer window. |
Inspector.CommandBars to add custom CommandBarControls on a built-in menu | Existing code continues to work, but customizations appear on the Menu Commands group on the Add-ins tab. Menu customizations for all add-ins that customize built-in menus appear together in the Menu Commands group. |
Inspector.CommandBars to add custom CommandBarControls on a built-in toolbar | Existing code continues to work, but customizations appear on the Toolbar Commands group on the Add-ins tab. Toolbar customizations for all add-ins that customize built-in toolbars appear together in the Toolbar Commands group. |
Inspector.CommandBars to add a custom toolbar | Existing code continues to work, but customizations appear on the Custom Toolbar group on the Add-ins tab. Custom toolbars for all add-ins appear together in the Custom Toolbar group. |
Inspector.CommandBars to remove a built-in command bar, command bar control, or menu item | Existing code will not work. Built-in controls can only be modified through the IRibbonExtensibility interface by an add-in. |
Word.CommandBars to add custom toolbars and controls for WordMail in Outlook 2000-2003 | Existing code will not work. Word macros stored in normal.dot or email.dot will no longer run, because WordMail in Microsoft Office Outlook 2007 runs under Outlook instead of Word. Prior to Office Outlook 2007, Word macros to add custom toolbars and controls executed from Word. Existing code must be updated for Office Outlook 2007. If you have an extensive library of WordMail macros, consider providing that code using an Outlook add-in. Use the Inspector.WordEditor object to return a Word Document object displayed in the current Inspector. Since WordMail is integrated into Outlook, all item types including Appointments, Contacts, and Tasks support the rich editing environment available in Microsoft Office Word 2007. |