The COMAddIns property is a collection of COMAddIn objects exposed by Office applications that support COM add-ins. The COMAddIn interface defines a small number of methods/properties, such as the ProgId of the add-in and the Connect state. It also defines...

I received an email from a customer the other day asking how to set up an Excel pivot table programmatically. The Excel OM exposes a number of objects and methods that you can use to create pivot tables, some more sophisticated than others. I wanted the...

In our spare time, Misha and I have been working on and off on the COM Shim and associated COM Shim Wizards for the last few years, and we've just published a new version here: Isolating Microsoft Office Extensions with the COM Shim Wizard Version 2.3...

As part of a little investigation I'm doing at present, I needed to build some simple native XLLs for testing purposes. This was the first time I had a need to build XLLs since the Excel XLL SDK was updated back in September. The updated Excel 2007 XLL...

Perusing the forums over the last few months, it’s clear that there’s some confusion about the various VSTO loader and runtime components. At the time of writing, there are 4 versions of VSTO in existence, including 4 sets of design-time tooling and 3...

In my previous post , I looked at how the VSTO add-in model is flexible enough to be used in prototyping scenarios for versions of Office not yet released. In principle, the same applies to Office host applications that are not currently supported.
...

As I announced at the Office Developers Conference in San Jose this week, we’re releasing a set of power tools that complement the developer’s experience when building Office-based or VSTA-based solutions. These tools are freely downloadable here . We...

We’ve released a slight update to the COM Shim Wizard. This is available as a free download here , and the covering article is on MSDN here . The differences Between v2.3.0.0 and v2.3.1.0 are summarized below.
Setup
The major difference between...

This of course is the advantage of using the old "shared add-in" project types – you can build one add-in that targets all versions of all Office apps that support COM add-ins (ie, 2000 onwards). The question is, can you do something similar with VSTO...

First, the Office client apps are COM-based. Normal COM activation relies on the registry. COM registration is a "last one wins" model. That is, you can have multiple versions of a COM server, object, interface or type library on a machine at the same...

Can you use WPF controls in VSTO solutions, and if so, how? VSTO's mission is to bring together the unmanaged Office platform and the managed development world. One aspect of this is the ability to build VSTO solutions that use managed controls within...

AddInSpy is a new diagnostic tool for reporting the maximum possible information about all Office add-ins registered on a machine. This is a free (unsupported) download, available on MSDN Code Gallery here . Covering article on MSDN here .
In fact...

In general, it is important that any code in a managed Office add-in should execute on the main UI thread. The reason for this is that there are several components that simply will not work when executed from any other but the main UI thread – examples...

First a warning: this is an advanced scenario, and you should not attempt to use this technique unless you’re sure you know what you’re doing. The reason for this warning is that while the technique described here is pretty simple, it’s also easy to get...

Suppose you control your enterprise desktops to the extent that you control which add-ins are installed. Suppose, further, that you want to avoid the hit of loading the CLR at application startup. One way is to delay-load your managed add-ins. The registered...

In a previous post , I discussed how you could build an add-in for multiple versions of Office, and explained the problems in this approach (and why it is not officially supported). One of the reasons this is not supported is because you end up building...

A customer (VSP) was using the COM Shim and identified a scenario where a bug in the shim code could cause the host application to remain in memory indefinitely – thanks, VSP for finding this and bringing it to our attention! Misha did some ninja debugging...

Here is a guest post by Eric Faller, Ribbon developer guru and all-round nice guy. It's a follow-up to my post about converting between the image formats used by Office and the .NET framework.
I’ll be talking about handling the alpha channel (transparency...

I’m mostly interested in the runtime aspects of VSTO, and less interested in the RAD design-time aspects (however wonderful they are), and in this post I want to explore some of the low-level infrastructure that the VSTO runtime provides. As a developer...

Can you use a managed usercontrol in an Office document in the same way that you can use a native ActiveX control – all without using VSTO? Some time ago, I posted about how to use native ActiveX controls within a doc-level VSTO solution, by wrapping...

Following on from my recent posts on exposing add-in objects, here and here , it occurred to me that its sometimes useful to be able to expose events from these objects. Recall that you can expose your add-in through the COMAddIn.Object property in the...

In an earlier post , I talked about how you could delay (or prevent) the loading of managed code using a native add-in. In that post I also listed the standard LoadBehavior settings, and I was assuming that everyone knows how these apply, but I got a...

Continuing on from my earlier posts on building add-ins for multiple versions of Office , avoiding the PIA version conflict , and add-ins for multiple versions without PIAs , a reasonable way to design your solution would be to use the lowest-common-denominator...

The new custom task pane model in Office 2007 is interesting. It certainly opens up a wide range of opportunities for providing a better user experience than the doc-level ISmartDocument-based task pane. It’s also interesting in that it provides some...

As you can imagine, we're working hard on the early stages of our Orcas release of Visual Studio. VSTO is the one SKU of Visual Studio that is closely aligned with Office. So, as we make our CTP (Community Technology Preview) releases between now and...