Sharing a Ribbon Customization Between Office Projects in Visual Studio 2010 (McLean Schofield)

A customer on the VSTO forums recently noticed that the steps we blogged about for sharing a single Ribbon customization between multiple projects in Visual Studio 2008 no longer works in Visual Studio 2010. When following the instructions in the blog post, you get an error when you try to open the Ribbon code file… Read more

Creating an Add-in for Office 2007 and Office 2010 that "Lights Up" on Office 2010 (McLean Schofield)

Managed Office add-ins traditionally have been able to run in the targeted application (the version of the application whose PIAs the add-in references) and in later versions of the application. Therefore, if you need to create a single VSTO add-in that can be run in multiple versions of an application, the typical guidance is to develop the add-in by using a project template… Read more

Fixing Compile and Run Time Errors after Retargeting VSTO Projects to the .NET Framework 4 (McLean Schofield)

Now that Visual Studio 2010 is released, some of you might be itching to upgrade your existing VSTO projects so that you can take advantage of the new features in the .NET Framework 4 that improve the Office development experience. Or, you might have already started using Visual Studio 2010 to develop a VSTO project… Read more

Create an Excel Shortcut Menu That Writes Selected Values to a Text File (Harry Miller)

It doesn’t take much code to add a command to a shortcut menu in Excel, but the menu objects have strange names so it’s not intuitive, to me at least. The trickiest part is just sorting out how it’s supposed to work, because it seems like it should be different from adding buttons to toolbars,… Read more

WPF in Office Solutions (Harry Miller)

A few months ago, Andrew Whitechapel wrote an article and sample application that demonstrates combining the native capabilities of an Office client application with the UI capabilities of WPF. Behind the UI, the application is connected to remote data and services via WCF and uses the RAD features of LINQ to manipulate that data. Some… Read more

Calling Into A VSTO Add-in From a COM Smart Tag (McLean Schofield)

My last post explained some of the differences between VSTO smart tags (that is, smart tags that you implement in a document-level solution for Word or Excel by using VSTO) and COM smart tags (that is, smart tags that you create by implementing COM interfaces provided by the smart tag SDK). If you are using… Read more

Understanding VSTO Smart Tags and COM Smart Tags (McLean Schofield)

The document-level projects for Excel and Word in VSTO (in Visual Studio 2005 and Visual Studio 2008) provide a simple object model that you can use to create smart tags for documents and workbooks. A smart tag is a string that an Office application recognizes in a document. After the application recognizes the string, it… Read more

Visual Studio Command Bar for Arranging Controls on Documents and Worksheets (McLean Schofield)

One of the lesser-known features of Visual Studio Tools for Office is the Microsoft Office Word and Microsoft Office Excel command bar. When you are developing a document-level project for Word or Excel (for example, a Word Document or Excel Workbook project) and you have the document or one of your worksheets open in the… Read more

Word Object Model: Getting Information from Word Dialogs (McLean Schofield)

Although VSTO provides many features that help simplify Office development (especially UI development), nearly every VSTO solution needs to dip into the underlying Office object model to get some work done. Because information about using the Office object models can be spread out in many different places, I thought it might help some readers who… Read more