Microsoft Office add-in / plug-in projects
architecture in .NET: C#, C++, VB.NET

Add-in Express™
for Microsoft® Office and .net

Inside of Add-in Express projects

Each Add-in Express solution is an ActiveX library (DLL, an in-process COM server) that contains one or several Automation objects which realize the interfaces required by the supported technology, e.g. IDTExtensibility2, IRibbonExtensibility, IRtdServer or ISmartTagRecognizer. By default, every project based on Add-in Express includes two projects: the add-in project itself and its setup project that can be used to deploy your completed add-in.

A sample Add-in Express solution

Component-centric programming model

To each of your projects Add-in Express adds a special module, the add-in module, which is the "heart" of the Add-in Express framework. It implements all necessary COM interfaces and contains a lot of application-specific code that considers all features and pitfalls of target applications. Also, the add-in module is a container for all Add-in Express components such as toolbars, menus, ribbon tabs, event helpers as well as for any other components (for example, your DB-aware components). So, the AddinModule is a central module for your projects where you place Office-specific and any other components, write your applied code and build the main logic of your add-in. Sure, the add-in module is a component itself and has a visual designer; its properties and events are available via the Properties window.

Module designer window

Remember, whenever you need to solve some task, you add a special component to the add-in module and create a new event handler. So, all your work is done over the add-in module, over components added to the add-in module and their events. For example, the add-in module publishes several add-in- and application-specific events such as AddinStartupComplete, NewMail, NewInspector, RibbonBeforeCreate, etc. Thus, to add your code on add-in start-up, you create an event handler of the appropriate event of your add-in module. More about Add-in Express components: Menu, command bar, ribbon components and Office Ribbon and Toolbar designers.

Initial code example

Below you can find the initial source code of the RAD module generated by Add-in Express (some automatically generated regions are collapsed):

Imports System.Runtime.InteropServices
Imports System.ComponentModel

'Add-in Express Add-in Module
 _
Public Class AddinModule
    Inherits AddinExpress.MSO.ADXAddinModule
 
#Region " Component Designer generated code. "
    'Required by designer
    Private components As System.ComponentModel.IContainer
 
    'Required by designer - do not modify
    'the following method
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        '
        'AddinModule
        '
        Me.AddinName = "MyFirstOfficeAddin"
        
        Me.SupportedApps = CType(( _
			AddinExpress.MSO.ADXOfficeHostApp.ohaExcel Or _
			AddinExpress.MSO.ADXOfficeHostApp.ohaOutlook Or _
			), AddinExpress.MSO.ADXOfficeHostApp)
    End Sub
 
#End Region
 
#Region " Add-in Express automatic code "
 
    'Required by Add-in Express - do not modify
    'the methods within this region
 
 
#End Region
 
    Public Sub New()
        MyBase.New()
 
        'This call is required by the Component Designer
        InitializeComponent()
 
        'Add any initialization after the InitializeComponent() call
 
    End Sub

    Public ReadOnly Property ExcelApp() As Excel._Application
        Get
            Return CType(HostApplication, Excel._Application)
        End Get
    End Property

    Public ReadOnly Property OutlookApp() As Outlook._Application
        Get
            Return CType(HostApplication, Outlook._Application)
        End Get
    End Property


End Class

Your solutions are secure, isolated, deployable and updatable

Adhering to a strict Office security policy, Add-in Express isolates each of your extensions with separate application domains and allows you the complete unloading of your managed extensions. You can isolate your Office extensions by two shims, the VSTO Loader provided by Microsoft (if it is installed on your development PC) and the Add-in Express Loader. The latter is delivered with Add-in Express, enforces all restrictions of the VSTO Loader and can be signed by your digital certificate.

Project settings

Deploy your Office solutions without any pitfalls

All setup projects generated by Add-in Express support the rigorous Vista and Office security model, embrace all necessary prerequisites and are completely compatible with the ClickOnce technology.




Client login

 

Login 

Password 

 

Remember me

Forgot my password



Developing a plugin in Visual Studio .NET - video