The 2007 Microsoft Office System Client-side Development User Interface & Outlook OM Martin Parry Developer and Platform Group, Microsoft Ltd
Agenda User Interface Custom Task Panes Ribbon Extensibility Outlook Form Regions Consolidated Outlook Object Model
Custom Task Pane Application-level Actions Pane Installed as add-in ICustomTaskPaneConsumer, or VSTO 2005 SE... this.CustomTaskPanes.Add( UserControl myCustomTaskPaneControl, string title ); Use any Windows Forms UserControl
Custom Task Pane
Ribbon Why? When the number of commands gets large, menus and toolbars get less efficient Almost all feature requests received against Office 2003 were for features already there More predictable, less user-customisable
Ribbon Extensibility Add-in implements IRibbonExtensibility One method... string GetCustomUI(string RibbonID) Add-in returns UI extension XML Outlook has multiple ribbons... View Mail, Compose Mail, View Appointment, etc.
Ribbon Programming Model Functions named in xml expected to be in class that implements IRibbonExtensibility OnLoad gives you an IRibbonUI object Invalidate, InvalidateControl methods “Pull Model” You cannot modify ribbon controls directly Invalidate and then handle callbacks
Ribbon - XML Top-level elements - ribbon controls always shown - shown only when needed - hangs off the big round button - quick access toolbar Child elements for... tab, group, button, editBox, gallery, etc.
Ribbon – Example XML <toggleButton id="toggleButton1" size="large” label="My Button" screentip="My Button Screentip" onAction="OnToggleButton1" imageMso="HappyFace" />
Ribbon – Example Result
Ribbon - Tips KeyTip Keyboard shortcut Just the key name, Alt is assumed ScreenTip The tooltip we know and love, max 1024 chars SuperTip More detailed text to accompany ScreenTip
Ribbon - Tips
Ribbon Extensibility
Ribbon – Dynamic Behaviour So far our XML has looked very static Sometimes you don’t know at design-time what your xml should look like Many attributes have equivalents that invoke callbacks to determine values getEnabled, getVisible getImage, getImageMso getLabel, getScreenTip, getSuperTip getItemCount, getItemImage, getItemLabel etc.
Ribbon - Containers Tab Group Controls DropDown, ComboBox ButtonGroup, DynamicMenu Gallery Some container controls rely on dynamic behaviour to populate their children
Ribbon - Images Can use built-in MSO images or your own, custom images imageMso=“...” getImageMso=“...” image=“...” getImage=“...” } These are the interesting ones! Code supplies images to Office in the form of IPictureDisp objects
Ribbon Extensibility: Containers and Images
Outlook Form Regions Extend any Outlook inspector with extra UI Controls also appear in the reading pane You choose when to apply For all items Only for items of a specific class Design in Outlook 2007 Code in VSTO 2005 SE
Outlook Form Region Loading Implement as an Outlook add-in Visual design in Outlook produces.ofs file Derive from _FormRegionStartup Better yet from Outlook.FormRegionStartup Create a Form Region Manifest file Register under...\Outlook\FormRegions\...
Form Region Manifest InternetHeaderDisplay adjoining Internet Headers true false FormRegionTest
Outlook Form Region
Outlook Object Model Unification Should not need CDO, Exchange Client, etc. Security Improved through unification Relaxed OM guard based on anti-virus Performance Search Forms Extend or replace built-in forms
Outlook OM – New Features Table Object High-performance, restricted results Can specify search filter Can access address book SelectNamesDialog, AddressList, etc. Property Accessor Gives access to all extended MAPI properties Context Menus Add items via the CommandBar model
Summary The UI in Office 2007 Extensible like never before Outlook programming model Unified More productive All using VSTO 2005 Second Edition
Additional Resources MSDN Links to blogs, newsgroups, etc. microsoft.public.office microsoft.public.outlook microsoft.public.word etc….
© 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.