MEF in Office?

In my last post, I looked briefly at MEF, and I’m wondering how this model can be applied to Office add-ins. The Office add-in model itself already achieves a level of dynamic composition, by virtue of the fact that the set of add-ins to be loaded is only discovered at runtime. However, even though the…


Silverlight Web Part in SharePoint

Having looked at Silverlight in Office client, I thought I’d round out the exercise by looking at Silverlight in Office server. It turns out that lots of people have looked at this before, and I relied heavily on information from several other people’s blog posts (see below), the Silverlight Blueprint for Sharepoint, and Steve Fox…


Silverlight Deep Zoom and Office Add-ins

I had some ‘free’ time today waiting to give a demo at an MVP conference session – the session over-ran, and I found myself sitting in the hallway for an hour. So I got to thinking about Silverlight and Office. If we assume that Silverlight is more or less a subset of WPF, then it…


Exposing Events From Non-VSTO Add-in Automation Objects

I posted a while back about exposing an automation object from an add-in that fires events. That post was couched in terms of VSTO add-ins. A customer asked recently how the same technique could be used in a non-VSTO add-in. So, that’s the topic of this post. First, here’s my automation object and the interfaces…


Message Hooks in Add-ins

Just like my earlier post on message filters, this is an advanced scenario – so be warned: you almost certainly don’t want to do this. However, there are probably some extreme edge-case scenarios where this technique might be useful. For example, Office apps are notoriously parsimonious with their events. I’m sure you can all cite…


Launching Office Apps Programmatically

There are at least 9 different ways to start or connect to an Office app programmatically in managed code, as summarized in this table: PIA Interop Using the Office PIAs is the most RAD approach, with the greatest level of design-time and compile-time support. This has to be the preferred approach for almost all scenarios….


Using Managed Controls as ActiveX Controls

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 them in managed usercontrols. A reader (Casey) asked the…


Advances in .NET Type System

Here at PDC, Misha Shneerson has just delivered a talk on a couple of very interesting new features provided by .NET 4.0. He did explain up front that these features have very broad applicability, but reading the session evals it’s pretty obvious that a lot of people didn’t get it. Probably this is because Misha…


Exposing Events from Managed Add-in Objects

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 Office OM, either directly (in a non-VSTO add-in) or through VSTO’s RequestComAddInAutomationService…


AddInSpy – Diagnosing/Troubleshooting Office Add-ins

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, there are 2 tools: AddInSpy, which is a WPF GUI application, and AS, which is a…