Office add-in basics: support command bar and Ribbon UI,
several Office versions, from 2000 to 2010 in one project
Add-in Express™ Add-in Express basicsCOM add-in programming always starts with implementing the IDTExtensibility2 interface which may present the following difficulties ModulesAn Add-in Express based project (see New Project dialog) includes a file called module. The module is the core component of the project; it represents a COM add-in, Excel UDF, etc. Each module provides a designer accessible in a number of ways. See one of them in the screenshot. The designer surface of the module incorporates:
The screenshot below shows the add-in module designer with the in-place designer for the ADXCommandBar component. See also Add-in Express components and Sampe Office COM add-in project. Host application UIAdd-in Express provides a number of components that allow customizing both the command bar UI and Ribbon UI of Office applications. Creating advanced task panes in Outlook, Word, Excel and PowerPoint version 2000-2010 is also supported. See Add-in Express Components. Host application eventsAdd-in Express provides a number of application-specific objects that allow specifying event handlers for application-level events of all Office applications. To handle such events, you need to add an Events object such as Outlook Events or Excel Events to the add-in module and specify event handlers for required events. See Events. In addition, Add-in Express supplies events classes providing methods in which you write your code to handle this or that event declared in a host application object other than the Application object of the host application. Supporting several Office versions in the same projectThere are two aspects of this theme:
Developing multiple Office extensions in the same projectAdd-in Express supports adding several modules in a project. That means you can create an assembly containing a combination of several Office extensions. Having several modules in an assembly is a common approach to developing Excel extensions; say you can implement a COM add-in providing some settings for your Excel UDF. What is essential is that all Office extensions will be loaded into the same AppDomain. The only exception is Excel Automation add-ins – they are loaded into the Default AppDomain (but see What Excel UDF type to choose?). If several Office extensions are gathered in one assembly, Office loads the assembly once but initializes the extensions in the assembly one at a time. That is, if you have two COM add-ins in the same assembly, one of them may be still not initialized when the first one is ready to work. See also HowTo: Create a COM add-in, XLL UDF and RTD server in one assembly. See also Deploying Office extensions and Accessing public members of your COM add-in from another add-in or application. |