Eugene Starostin

Create Microsoft Office extensions using RemObjects Chrome

Two of the most popular words in the Microsoft Office development globe right now are Office extensibility and application-level customization. These two features are a great way to get the most from Microsoft Office and build plugins that your customers long for.

In this three post series, I’ll be covering the most important concepts and approaches of creating custom Office extensions based on RO Chrome for Visual Studio and Add-in Express for Microsoft .net.

Today, I’ll dig a little bit into the history of Office application-level extensibility, highlight the key features of Add-in Express and show how to quickly get started with developing Outlook COM add-ins using Chrome and Add-in Express.

Office application-level extensibility

Microsoft Office has a long history of applications extensibility. Microsoft added the support for COM add-ins to Office 2000. In the first release of Microsoft Office 2002, the Smart Tags technology got supported. The second release of Office 2002 added Excel customization with Real-Time Data servers (RTDS) and Automation add-ins (user-defined functions). Finally, Office 2007 made the Ribbon UI customizable and extended the COM add-in technology for all Office applications. On the other hand, Microsoft released Visual Studio Tools for Office (VSTO) 2003 and 2005 that allow developers to extend Office with document- and application-level extensions. Unfortunately, VSTO supports VB.NET and C# only. Today on the development tools market there is only one tool that supports Office customization on RemObjects Chrome, and it is Add-in Express.

Key benefits of Add-in Express

Version 2007 of Add-in Express completely supports RemObjects Chrome as a full-featured platform for Office customization. Today, Chrome developers can create all types of Office extensions including Office COM add-ins, smart tags, Excel RTD servers and UDFs for all available Office versions. Add-in Express is based on our long-term expertise in Office integration and offers you with numerous unique features that make your Office plug-ins stable, powerful and modern. Below I’m listing the key benefits of Add-in Express for your Chrome and Office development:

True RAD programming model
Being an offspring of Office Add-in Express for Borland Delphi 5, Add-in Express 2007 for Microsoft .NET is completely based on the True RAD paradigm. Add-in Express has a programming model similar to the Delphi one, so your Office development on Chrome will be focused around RAD modules, visual designers and components.

Add-in Express consistently follows the strict Office security model and makes your extensions secure and isolated. Every your plugin runs in its own AppDomain and is isolated by a special custom shim, the Loader, that offers you the capability of safe unloading.

Deployablity and maintainability
By default, all solutions based on Add-in Express include setup projects built on the Visual Studio and Windows deployment standards and compatible with the ClickOnce technology.

Compatibility and version-neutrality
Using Add-in Express you make your Office extensions version-independent, so you write your add-in code once and have it work on all Office versions, across 2000 through 2007. Also, your extensions are compatible with all Office suites, from Student and Home to Enterprise and Ultimate. With Add-in Express and Chrome you can customize the following Office applications: Outlook, Word, Excel, Access, Project, FrontPage, Visio, Publisher, InfoPath, MapPoint, PowerPoint.

Getting started

Below I’m giving step-by-step instructions on how to develop an Outlook COM add-in using Chrome with Add-in Express. The example illustrates the important concepts of using RO Chrome together with Add-in Express. Please note, you will not find much of Chrome code here, but rather see a lot of screenshots since the main goal of this post is to highlight all Add-in Express RAD capabilities and its concepts. Remember, the example assumes that you have some experience in Office development and the Office object model.

Also, make sure you have Visual Studio 2005 and Chrome 1.5 for Visual Studio with the default General Development settings installed. Please mind, when we refer to Chrome and Add-in Express, we are referring to Chrome 1.5.5 and Add-in Express 3.4. We run Visual Studio 2005, Office 2007 and Business Contact Manager 2007 with all latest updates installed on Windows Vista Business. However, you can use Windows 2000 and Windows XP as well as Visual Studio 2003, Office 2000 – 2003 and corresponding versions of RO Chrome and Add-in Express.

Starting a new solution

To start a new solution, run the Visual Studio IDE, select File\New\Project, and click on the Other Project Types\Extensibility\ADX COM Add-ins project template. This runs the New COM Add-in wizard that creates a new solution based on Add-in Express.

Add-in Express project templates

The first window of the wizard asks you to select the programming language, the isolation and setup project.

Add-in Express project wizard

Select Chrome Project and click Next. The second window prompts you to select target applications and Office interop assemblies for your plugin. Select the application and interop assemblies you need and click Finish. A new solution is created.

Selecting Office applications and PIAs options

Compatibility, version-neutrality and Office interop assemblies
The Add-in Express core is specially designed to be compatible with all Office applications, versions and suites. You can develop one solution for one, several or all Office applications installed on your development PC by checking corresponding check boxes.

For .NET, Add-in Express provides access to Office objects via Office interop assemblies, the Office type libraries provided by Microsoft (primary interop assemblies, PIAs) or custom type libraries offered by Add-in Express. The problem is that the primary interop assemblies from Microsoft are not version-independent and support Office 2002, 2003 and 2007 separately.

If you have to develop a COM add-in compatible with several Office versions, you can use version-neutral interop assemblies delivered by Add-in Express. Just check the Use Version-neutral Office PIAs check box. It gives you access to Office objects via the Office 2000 object model but you can stay with version-specific features through the late binding. It is a very effective technique to support several Office versions. In any case, remember that the Add-in Express core is version-independent, so you may or may not use version-neutral interop assemblies.

In the next post, I’ll speak about the inside of your office solutions, I will cover such important issues as security and deployment, RAD modules and visual designers and give a few suggestions of how to put them all into play in your own projects.

Related posts:

Customize Office toolbars, ribbons, task panes on RO Chrome
Develop MS Office add-ins, smart tags, RTD servers on RO Chrome

Post a comment

Have any questions? Ask us right now!