System.IO.FileNotFoundException: 'Could not load file or assembly 'office, Version=15.0.0.0, Culture=neutral

Ryx 16 Reputation points
2021-02-19T08:21:02.12+00:00

Hi guys, I am new to VB/VBA.

I wanted to read content of Email in Outlook. However, I get this error:

System.IO.FileNotFoundException: 'Could not load file or assembly 'office, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. The system cannot find the file specified.'

I added a project reference : Microsoft Outlook 12.0 Object Library. Also tried Microsoft Outlook 16.0 Object Library

I tried browsing : Windows -> assembly -> GAC -> Microsoft.Office.Interop.Outlook, but I still get the error.

My Office version is : 18.1901.1141.0
My Outlook version is : 2101 (Build 13628.20448)
Using Visual Studio 2019

I tried googling this issue but I still couldn't find a solution for me.

Thanks in advanced.

Developer technologies Visual Basic for Applications
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 23,385 Reputation points Volunteer Moderator
    2023-08-01T18:50:55.2+00:00

    To resolve this issue, you should use the correct Office Interop library version that matches your Office installation.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.