.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


comments powered by Disqus

Featured

  • OpenSilver 3.1 Unveils Drag-and-Drop XAML Designer for VS Code

    Claiming an industry first, Userware announced a drag-and-drop XAML designer for use in VS Code, coming with OpenSilver 3.1, the latest iteration of the open-source implementation of Microsoft's long-deprecated and oft-mourned rich client development platform, Silverlight.

  • Visual Studio Dev Vexed by Copilot's Obtuse 'Responsible AI' Refusal

    No matter what, some systems simply won't divulge exactly what in the current conversation caused them to balk, simply pointing to vague policies and generic guidance.

  • Build Your First AI Applications with Local AI

    "AI right now feels like a vast space which can be hard to jump into," says Craig Loewen, a senior product manager at Microsoft who is helping devs unsure about making that first daunting leap.

  • On Blazor Component Reusability - From Day 0

    "We want to try to design from Day One, even Day Zero, with reusability in mind," says Blazor expert Allen Conway in imparting his expertise to an audience of hundreds in an online tech event on Tuesday.

  • Decision Tree Regression from Scratch Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of decision tree regression using the C# language. Unlike most implementations, this one does not use recursion or pointers, which makes the code easy to understand and modify.

Subscribe on YouTube