Converting between IPictureDisp and System.Drawing.Image

This is an interesting manifestation of the gap between COM-based native servers, such as the Office client apps, and managed code. There are a number of scenarios where you need to convert image formats between the native COM-based IPictureDisp and the managed System.Drawing.Image class and its derivatives such as Bitmap. One such scenario is in…

5

Updated COM Shim Wizards

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, with the accompanying download here. The new version includes…

56

Can you build one add-in for multiple versions of Office?

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 add-ins? The answer is “No, not in any supported way”….

31

Why is VS development not supported with multiple versions of Office?

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 time. Also, all of these entities can be registered. However, multiple…

27

Office 2007 New Extensibility Interfaces

Office 2007 introduced a set of new extensibility interfaces. Prior to Office 2007, there were several extensibility interfaces, which all behaved differently, required different development techniques, different deployment/registration and different runtime lifetime characteristics. These included ISmartTagRecognizer, ISmartTagAction, ISmartDocument and IRtdServer. The only interface that was usefully implementable in a COM add-in was IDTExtensibility2 – and,…

6

Editable TreeView

As I was updating the COM Shim Wizards (the new version should be published in a couple of weeks), I found I had a need for an editable TreeView. There is only limited support for editing in the standard TreeView. So, I did what all sensible people do – I LiveSearched for it to see…

0

Why is it so hard to shim IRibbonExtensibility?

The COM Shim Wizards are a set of Visual Studio 2005 project wizards that automate the generation of COM shims for non-VSTO managed Office extensions. These shims support COM add-ins, smart tags and real-time data components. The shim for each is broadly similar, although there are obvious differences to allow for the different interfaces that…

4

Microsoft .NET Development for Microsoft Office

A number of people have reported that the link to the companion content seems to be broken. MSPress are aware of the problem, and are fixing it. Meanwhile, here’s a direct link. http://download.microsoft.com/download/a/4/3/a433e8ad-25b5-420e-9126-292b380eb2f3/setup.exe Here’s the main book link: http://www.microsoft.com/mspress/books/7756.aspx …and replying to all those people who’ve asked whether I’m writing an update for Office 2007,…

0

VSTO Add-ins, COMAddIns and RequestComAddInAutomationService

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 an Object property. By default, the value of the Object property is null. An add-in…

73

COM Developers are from Mars, VBA Developers are from Venus, or: Typing, Binding and Wrapping in Office Development

I paused over my final mince pie today, and pondered the psychology of Office developers (as one does). Office development is a curious mix of different programming philosophies that has given rise to a number of interesting behavioral practices among developers. I picked the title for this post because one of the curious things is…

2