Primary Interop Assemblies

Office applications such as Excel and Word are written in unmanaged code.
The only way .NET code can interoperate with the unmanaged Office COM objects is via the Primary Interop Assemblies.
The Microsoft Office Primary Interop assemblies are the interop assemblies that you need to reference and use.
These PIA files are part of Visual Studio and are not included with Office 365, Office 2019 or Office 2016.


Microsoft.Office.Interop

This namespace needs to be referenced in your code

using Excel = Microsoft.Office.Interop.Excel; 
using Word = Microsoft.Office.Interop.Word;
using PowerPoint = Microsoft.Office.Interop.PowerPoint;
using Outlook = Microsoft.Office.Interop.Outlook;

Visual Studio References

When you install Visual Studio, the PIAs are automatically installed into the Visual Studio folder on the C drive.
When you create a new project, references are automatically added to refer to the PIAs on the C drive.
Can be added as a COM Reference.


Embedded PIAs

Visual Studio 2010 (C# v4.0) provided the ability to Embed Interop Types


Interop Assemblies

The primary interop assemblies are the corresponding runtime callable wrappers for the Microsoft Office applications.
When you are adding references to PIAs from within your project you should use the .NET tab.
It is possible to create your own wrappers for COM Object Models using tlbimp.exe.
An interop assembly is a managed .NET equivalent of a COM type library.
An Interop Assembly that is distributed by the owner of the original COM server is called a primary interop assembly (PIA).
Primary Interop Assemblies are always digitally signed by the publisher of the original unmanaged assembly.



Embed Interop Types

Added in .NET 4.0
This option was added to Projects > Properties
Instead of including these files as part of your solution they should be embedded into your assembly.
The PIAs are embedded into your project by default.
There is an "Embed Interop Type" property associated with each interop reference assembly.
If the "Embed Interop Type" property is set to False, you must include the PIA for each version of Office that the application will run with.


These can be embedded into your assembly so that you don't have to deploy them alongside your application
This means that my application is now independent of the version of excel that is installed on a machine.
This automatically includes all the PIA type references used in the project and therefore removes the need to install the PIA prior to deployment Include a screen shot of this for the Excel PIA
There is an "Embed Interop Type" property associated with each interop reference assembly


Microsoft doesn't publish the PIAs because the interop types should be embedded into the solution.
link - stackoverflow.com/questions/21013912/can-i-still-use-microsoft-office-interop-assemblies-with-office-2013



File Location

When you install Visual Studio, the PIAs are automatically installed into the Visual Studio folder on the C drive.
These PIAs should not be deployed with your solution, they should be Embedded into your assembly
Office 365, Office 2021, Office 2019 and Office 2016 all use the same PIAs.


Office 365, Office 2021, Office 2019 and Office 2016

These PIAs are not included with Office 365, 2019 or 2016.
There are no version "16.0" of these files, version 15.0 are used.

C:\Program Files (x86) \ Microsoft Visual Studio \ Shared \ Visual Studio Tools for Office \ PIA \ Office15 \ 

Office 2013

These PIAs were not included with Office 2013.
These can all be found in the following folder:

C:\Program Files (x86) \ Microsoft Visual Studio \ Shared \ Visual Studio Tools for Office \ PIA \ Office15 \ 
Microsoft Office 15.0 Object LibraryOffice.dll
Microsoft Excel 15.0 Object LibraryMicrosoft.Office.Interop.Excel.dll
Microsoft Word 15.0 Object LibraryMicrosoft.Office.Interop.Word.dll
Microsoft PowerPoint 15.0 Object LibraryMicrosoft.Office.Interop.PowerPoint.dll
Microsoft Outlook 15.0 Object LibraryMicrosoft.Office.Interop.Outlook.dll

Office 2010

These PIAs were included with Office 2010.
These can all be found in the following folders:

C:\Program Files (x86) \ Microsoft Visual Studio \ Shared \ Visual Studio Tools for Office \ PIA \ Office14 \ 
C:\Program Files (x86) \ Microsoft Visual Studio 14.0 \ Visual Studio Tools for Office \ PIA \ Common \
C:\Program Files (x86) \ Microsoft Visual Studio 14.0 \ Visual Studio Tools for Office \ PIA \ Office14 \
Microsoft Office 14.0 Object LibraryOffice.dll
Microsoft Excel 14.0 Object LibraryMicrosoft.Office.Interop.Excel.dll
Microsoft Word 14.0 Object LibraryMicrosoft.Office.Interop.Word.dll
Microsoft PowerPoint 14.0 Object LibraryMicrosoft.Office.Interop.PowerPoint.dll
Microsoft Outlook 14.0 Object LibraryMicrosoft.Office.Interop.Outlook.dll

2007 Assemblies

These PIAs were not included with Office 2007.

Microsoft Office 12.0 Object LibraryOffice.dll
Microsoft Excel 12.0 Object LibraryMicrosoft.Office.Interop.Excel.dll
Microsoft Word 12.0 Object LibraryMicrosoft.Office.Interop.Word.dll
Microsoft PowerPoint 12.0 Object LibraryMicrosoft.Office.Interop.PowerPoint.dll
Microsoft Outlook 12.0 Object LibraryMicrosoft.Office.Interop.Outlook.dll

© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext