Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: VB.NET
Hi All,
I have a application EXE which will run correctly and throwing the below exception in some systems during some operations like button click events.
Any one suggest how to fix this exception.
Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
Could not load file or assembly 'Microsoft.Office.Interop.Word, version=, Culture=neutral,PublicKeyToken=71e9bce111e9429c' or one of it's dependencies.The system cannot find the file specified.

Details Continue Quit
Posted 13-Aug-12 22:48pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I think the error message is quite explanatory. Either the machine does not have Office installed or has a different version installed. Make sure that the correct version of office is installed such that the versions of the assembly present on the server matches with the assembly expected by your application.
Prasad_Kulkarni at 17-Aug-12 0:20am
Manas Bhardwaj at 17-Aug-12 3:09am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

To use Microsoft.Office.Interop.Word you need to have Microsoft Office installed on the machine. So, you cannot expect all the machines would have this. Better option is to go for Office OpenXml approach which does not require Microsoft Office installation on the machine.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 250
1 Jochen Arndt 155
2 PIEBALDconsult 150
3 DamithSL 125
4 Afzaal Ahmad Zeeshan 120
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190

Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 14 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100