.NET Tips and Tricks

Blog archive

Adding a Menu to Office with Add-In Express

In the September issues of Visual Studio Magazine we reviewed Office Add-In Express (Build Office Apps with Add-in Express). I found that creating an Office Add-in with Add-In Express is incredibly easy.

After picking "ADX COM Add-In" from the Extensibility section of the New Project dialog, a Wizard walks you through all the choices necessary to create the initial project, including generating a strong name key file. As part of the Wizard you can choose which version of Office you're going to target (targeting Office 2000 supports all versions) and how many of the Office components you want your Add-In to integrate with. The resulting project has all the necessary references, including DLLs for both 32 bit and 64 bit systems.

Also added to your project is AddInModule.cs, which handles communicating with Office. Not only is all the necessary base code present but so are GuidAttributes added to the Class to support installing into COM. In design view for the AddInModule there is something new: a Menu across the top with about twenty options.

Seven of those options are tied to adding menus (including context menus) to Office and an additional seven are for adding items to the Ribbon (other support creating SmartTags and other Office features). While adding an item to the new Office Ribbon is notoriously awkward and difficult, with Add-In Express you just click the AdxRibbonTab option at the top of the design surface. Once you've add a AdxRibbonTab, you can add controls to it using the Controls property on the control's Property List. You even get a preview of the impact on the ribbon.

Posted by Peter Vogel on 09/17/2010 at 1:16 PM

comments powered by Disqus


  • Vendors Update Controls for .NET Core 3.1, Blazor

    This week saw two third-party vendors of dev tools -- UX and UI toolkits and controls -- release new offerings that include support for two of Microsoft's main open source frameworks, the cross-platform .NET Core 3.1 and Blazor, which allows for creating browser-based web applications with C# instead of JavaScript.

  • C++ Is Focus of New Visual Studio 2019 v16.7 Preview 2

    C++ development is a focus point of the new Visual Studio 2019 v16.7 Preview 2, featuring a slew of tweaks and improvements touching upon remote SSH connections, IntelliSense support and more.

  • Clustering Non-Numeric Data Using C#

    Clustering non-numeric -- or categorial -- data is surprisingly difficult, but it's explained here by resident data scientist Dr. James McCaffrey of Microsoft Research, who provides all the code you need for a complete system using an algorithm based on a metric called category utility (CU), a measure how much information you gain by clustering.

  • So What's Up with Microsoft's (and Everyone Else's) Love of Rust?

    Microsoft already stewards several popular programming languages -- C#, TypeScript, F# -- so what's up with its love of Rust, along with the rest of the world?

  • C# Steps Up Programming Language Popularity Ladder

    Microsoft's C# programming language climbed a year-over-year notch on the TIOBE Index, which measures popularity among developers.

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events