A bit about Microsoft Office PIA
Today I’m overwhelmed with inspiration. Don’t know how to cope with it. Hey, somebody, stop me! :-) All in all, I’ve come to one of the key issues. What is the Office PIA and what should we do with it? To start with, a few words about PIAs, primary interop assemblies.
There was OLE first, remember? Next there’s OLE Automation. After that came COM, DCOM and COM+. Do you remember what type libraries ITypeInfo and ITypeInfo2 are? A PIA is, in fact, a COM type library imported to .NET. But not to IDL. PIA is much more comfortable to use because it is a set of .NET classes that wrap all interfaces of a COM type library. And an Office PIA is an imported MS Office type library. For more details, please see the links below. I will just say that they are very easy to use. All in all, I recommend.
However, there’s one problem here. There are official PIAs for Office XP and Office 2003 published by Microsoft. For Office 2000 there’re no official PIAs. Meanwhile, Microsoft says:
Microsoft does not guarantee that the Office PIA will be backwardly compatible or that the Office XP PIA and the Office 2003 PIA can be run side-by-side in the same instance of an Office application. Office XP managed code add-ins must be built against the Office XP PIAs. The Office 2003 managed code add-ins must be built against the Office 2003 PIAs. Therefore, if you build an add-in solution that you intend to use with both versions of Office, Microsoft recommends that you build a version of your add-in for each version of Office that you intend to support.
Scaring, isn’t it? But do you want to create special versions of your add-in for Office 2000, XP, 2003 and 2007? Or have you customers already upgraded their Office to 2007? I answered this question long ago. I use Office 2000 PIAs generated by myself for add-ins that must work in all available versions of Microsoft Office. If the add-in is to work in Office XP and higher, I use the official Office XP PIAs. And it works in spite of the fact that Microsoft doesn’t guarantee it. I know the reasons why it is no guaranteed. But I will not tell you about them, because my inspiration has run dry. Today I was helped by Mark Knopfler from his Shangri-La. :-)
Last updated on 10-Jun-2013.
Now Add-in Express for Office and .net provides the PIA mentioned above to allow the developer to create COM add-ins that support all Office versions across 2000 through Office 2013 32-bit and 64-bit.
For more information about the correct usage of interop assemblies, please see: Supporting
several Office versions in an add-in. Interop assemblies and late binding.
Working with the Office XP Primary Interop Assemblies:
Installing and Using the Office 2003 Primary Interop Assemblies:
Download Official Office 2003 PIAs:
Download Official Office XP PIAs: