.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

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

Subscribe on YouTube