다음을 통해 공유


Targeting multiple versions of Office without PIAs

Having to rely on the correct version of PIAs to be deployed for implementing Office add-ins has become the inevitable reality for many Office devs. This reality is quite gruesome, I must add.

Andrew Whitechapel describes a technique allowing single add-in to target both Office 2003 and Office 2007 by importing interop definitions that are new in Office 2007 PIAs directly into your assembly. This allows you to use Office 2007 features w/o depending on Office 2007 PIAs. It is a good start to become PIA free.

Tell me your story. What has been your experience with PIAs and limitations that those impose on you?

Comments

  • Anonymous
    June 05, 2008
    Our organization has created our own wrapper over each of the three PIAs (10, 11, & 12) then we load the appropriate one at runtime. ComImport could potential erase the need for this cover. Certainly talking to Office via a PIA is cumbersome. Are there any completely managed interfaces planned for future versions?

  • Anonymous
    June 06, 2008
    There is one good point - the programming model exposed by the PIA is just too 20th century. What about deployment requirements, versioning requirements, multi-targeting your managed addins to work with multiple versions of Office. Are those pose any problems and, if so, then how? Any takers? > Are there any completely managed interfaces planned for future versions? From time to time the question of designing completely managed interface on top of Excel/Word/Outlook comes up. The results are the same - we are still using PIAs. Designing an OM from bottom up for a very mature product is not an easy task. However, the advances in the adoption of managed code are obvious and it would be logically the next step for Office to start moving in this direction. All I can tell right now is that next version will not have managed object model. Talking about anything beyond that would be a complete speculation so I wont.