Andrei Smolin

New version of Add-in Express sample COM add-in projects

Hello Developers,

Quick news: we’ve developed a new version of sample COM add-in projects that we provide in the downloadable archive on the Add-in Express .NET Downloads page; the archive is labelled Add-in Express for Office and .NET sample projects.

The sample add-ins create the Ribbon UI; the source code shows how you create Ribbon controls and update them depending on the context. In the source code, we also show the recommended way of using Add-in Express panes. Plus, the projects handle host applications’ events including pressing a keyboard shortcut. Finally, you’ll see how to use the object models to identify the context in which a pane or Ribbon control is shown.

The new version is also available for download at the end of this post. We suppose this will help us quickly respond to your questions relating to these sample projects. Later on, we’ll publish newer versions here as well, if required.

Also, find the updated versions of the Add-in Express manual and class reference (CHM). As to the class reference built in Visual Studio, you’ll get it with the next Add-in Express build.

Caution. If you re-use the source code, make sure you change the ProgId and Guid attributes of the add-in module! Otherwise, you may create a mess in the Windows registry.

Available downloads

Your first COM add-in for Excel, PowerPoint and Word. Version 2.0. VS 2010-2019:

VB.NET add-in source code

C# add-in source code

Your first COM add-in for Outlook. Version 2.0. VS 2010-2019:

VB.NET add-in source code

C# add-in source code

5 Comments

  • https://secure.gravatar.com/avatar/db8fc1708ef891a718ba5655988f4153?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Dimitri says:

    In VS2013 with Adx ver7.7 it crashes with error:

    Value of type ‘1-dimensional array of Byte’ cannot be converted to ‘System.Drawing.Image’.

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Dimitri,

    Thank you for the bug report. Unfortunately, I think this won’t be fixed as the sample projects aren’t backward-compatible.

    And, although this appears to be a kind of bummer, do not hesitate to report bugs. Such reports do help us keep our software products working correctly.

  • https://secure.gravatar.com/avatar/ea60a5302f19756e22212b4b9f346197?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Norman Neubert says:

    Hi Andrei, compiled the project in VS2017, Office 365 (16.0.13801.20240) 32 Bit on 2 PCs. Compiles fine, no errors. Opens Word when started from VS. But thats it. No command bar, no pane, no events. Nothing happens. Doesn’t it work when you press F5?

    Kind regards
    Norman

  • https://secure.gravatar.com/avatar/ea60a5302f19756e22212b4b9f346197?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Norman Neubert says:

    Oh delete my posts. I found it. First read, then ask :) Sorry.

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Norman,

    We are human so we must err sometime. :)

    To All: you should register the project. This creates registry keys required for Office to load your COM add-in.

Post a comment

Have any questions? Ask us right now!