TechEd 2006: Office 2007 "ribbon" UI extensibility demonstrated

Boston (MA) – At a surprise early opening of the Hands-On Labs at what’s officially the day before the launch of the TechEd 2006 Conference here, Microsoft showed off a multitude of features developers have been longing to see up close. A bank of hundreds of terminals was devoted to demonstrating the new extensibility features of Office 2007 and the new edition of SharePoint, including the ability for developers to locally add compiled functions written in high-level languages like Visual C#, without recompiling the applications themselves.

Six years ago, the way you added functions to an Office application like Microsoft Word was by building that function into a Visual Basic for Applications procedure, and attaching that to a document template. If you attached it to the Normal template, it would automatically be attached to every document the application would write. The problem with doing it this way was that the template usually had to be distributed along with the document made with that template; and Windows security functions these days typically block “macros” from being distributed with documents.

We took this opportunity to try to push our own functionality – simple though it may be – into Microsoft Office 2007’s new ribbon.

The new model for extensibility in Microsoft Office 2007 is the .NET Framework. Functions written in a .NET language such as C# can be built by Visual Studio 2005 (whether the same extensibility features are included with the Express versions that Microsoft now distributes for free, is yet to be determined). In the completely revised Office 2007, the ribbon is the new container for functions and commands that used to be found on the menu bar, which has become so-o last year. It so happens that the controls featured inside the ribbon are described by an XML data document. So you can build an attachment XML document that includes branches to your own C#, C++, or Visual Basic code, and then compile that code using VS 2005, in such a way that the names and icons of the buttons you add to the program become embedded in Office’s resource files.

So we tried this ourselves: Using one of the pre-constructed labs, we created a kind of “Hello, World” demonstrator button that is pulled up in one of the ribbon’s new palettes. The code itself was nothing unusual – essentially ordinary C# functions with explicit interfaces (code that handles the entry and exit functionality) that can be inserted practically automatically.

Once we had worked through the debugging and the nomenclature, we were actually able to plant our own code inside Microsoft’s new ribbon. With little extra trouble, we could have planted much more meaningful code – for example, functions that pertain to exclusive business needs, such as a content management system.

A TG Daily button in Office 2007.

Stay tuned throughout the week for more from the site of Microsoft’s TechEd 2006 conference in Boston.