Microsoft.Office.Interop.Word

If you keep getting the following error message in vb.net, you are not alone:

Could not load file or assembly
‘Microsoft.Office.Interop.Word, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c’ or one of its dependencies. The system cannot find the file specified.

Usually, what happens is your code works perfectly fine in your dev box, but your clients report getting the error above. Don’t waste time on debugging at your dev side, because the real issue is that your clients are missing some dll files due to different licenses.

Ask your clients to install the Microsoft Office Primary Interop Assemblies (PIA) on their machines.

For office 2007
http://www.microsoft.com/downloads/details.aspx?familyid=59DAEBAA-BED4-4282-A28C-B864D8BFA513&displaylang=en

For office 2003
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad

To double check after installation, in C:windowsDirassembly you will see the Microsoft.Office.Interop.Word file there along with many other office dll files.

I hope this can save you a few hours of your life! 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s