What Component IDs should I search for to detect whether the Office 2010 PIA's are Installed
Asked Answered
H

2

12

I'm creating a plug-in for Office 2010 and need to detect on install whether the Office 2010 PIA's are installed.

I have done this for 2003 and 2007 but cannot find the Component ID's for 2010 does anyone know what they are?

thanks, Ed

Hourglass answered 25/5, 2010 at 10:22 Comment(0)
S
13

Do a search for the component ID for the PIA (primary interop assembly) applicable to the component of office you need from the list below:

{EA7564AC-C67D-4868-BE5C-26E4FC2223FF}   Excel
{4153F732-D670-4E44-8AB7-500F2B576BDA}   InfoPath
{1D844339-3DAE-413E-BC13-62D6A52816B2}   Outlook
{EECBA6B8-3A62-44AD-99EB-8666265466F9}   PowerPoint
{3EA123B5-6316-452E-9D51-A489E06E2347}   Visio
{8B74A499-37F8-4DEA-B5A0-D72FC501CEFA}   Word
{957A4EC0-E67B-4E86-A383-6AF7270B216A}   Project
{B2279272-3FD2-434D-B94E-E4E0F8561AC4}   Forms 2.0
{011B9112-EBB1-4A6C-86CB-C2FDC9EA7B0E}   Graph
{7102C98C-EF47-4F04-A227-FE33650BF954}   Smart Tag
{64E2917E-AA13-4CA4-BFFE-EA6EDA3AFCB4}   Office Shared

E.g. if you are writing a Word add-in, then you only really need to check for the PIA with the GUID {8B74A499-37F8-4DEA-B5A0-D72FC501CEFA}

From here

Microsoft have recently released the PIAs for 2010 seperately. Available here

If you need to support Office 2013, the component Ids are documented here: Office 2013 PIA component Ids

Swivet answered 25/5, 2010 at 10:24 Comment(2)
Hi all, I installed Office 2010 PIA without installing Office 2010, and I cannot find the keys listed above.Sateen
Hi Peter-I downloaded the standalone msi to check if the guids had changed, and they appear the same. You mentioned keys-bare in mind that these are not registry keys or values, they are the guids representing components which are installed in Windows. So the idea is you do a component search on the guid within an installer to see if the particular PIA you require exists on the target system.Swivet
C
1

There is no need to install PIA separately or check the version of installed PIA if you target .NET Framework 4 and above. Check this article.

When you compile an add-in project that targets the .NET Framework 4, by default the type information for all the PIA types referenced in the add-in code is embedded in the add-in assembly. At run time, this type information is used to resolve calls to the underlying COM type, rather than relying on type information in the PIAs.

Just check in your project that the reference to Microsoft.Office.Interop.Excel has the correct version and EmbedInteropTypes set to true.

Corridor answered 18/10, 2014 at 14:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.