The PODA Blog

News, views and articles from our membership

Archive for August, 2007

Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part III

Posted by Dennis Wallentin on 2nd August 2007

Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part III

This article focuses on adding Ribbon Extensibility to a project, and is based on the Add-in Core discussed here. All code and picture for this post is available at my English site: Creating & Deploying Managed COM Add-ins with VSTO 2005 SE - Part II

After that the connection class has been created (Creating and Deploying Managed COM Add-ins with VSTO 2005 SE - Part I) the next step is to implement the IRibbonExtensibility. This can be done manually but MSFT have made available a simple Ribbon wizard. Choose the Ribbon Support from the component list and a class module as well as a XML file is added to the project. Both these files include skeleton code which gives us a platform to start from. In my opinion this is an excellent approach and in the next version of VSTO (version 3.0 aka ‘Orca’) we will have a great Visual Designer tool for creating highly customized Ribbon solutions.

The most interesting part is that an overriding method, RequestService, is added to the class module. In return this method allows us to work with the external libraries of IRibbonExtensibility, ICustomTaskpaneConsumer and FormRegionStartup. At present only these libraries are supported but in the future we can expect to work with additional libraries. Andrew Whitechapel has published a good post on the subject - Low-level support for ICustomTaskpaneConsumer, IRibbonextensibility and FormRegionStartup. In my opinion this is also an excellent approach as it gives us an easy access to external libraries and therefore a flexibility situation when working with VSTO based projects.

Working with RibbonX may or may not be difficult but there exist some good resources online that may be of interest to consult:

When it comes to Ribbon customization I prefer to keep things very simple. Compared with classic CommandBars (CBs) the structure is totaling different. Although MSFT probably will add some additional properties and methods to the Ribbon in coming Office versions it can, per design, never be as flexible as the CBs. In general I believe we all need to think deep on how we view and approach the Ribbon UI. After all, it’s designed for the group of end-users and not for the group of developers.

As for customized images the preferable file format is PNG and I can only agree on that recommendation.

Kind regards,
Dennis

Posted in Office (All), VSTO | 1 Comment »