Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
Hi All,
 
I have a vb.net 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=12.0.0.0, Culture=neutral,PublicKeyToken=71e9bce111e9429c' or one of it's dependencies.The system cannot find the file specified.
 

Details Continue Quit
 
Thanks.
Posted 13-Aug-12 21:48pm
Rate this: bad
good
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.
  Permalink  
Comments
Prasad_Kulkarni at 17-Aug-12 0:20am
   
FIVE! :D
Manas Bhardwaj at 17-Aug-12 3:09am
   
thx!
Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 BillWoodruff 314
1 Sergey Alexandrovich Kryukov 290
2 George Jonsson 274
3 CPallini 255
4 OriginalGriff 237
0 OriginalGriff 4,895
1 CPallini 4,010
2 Sergey Alexandrovich Kryukov 3,514
3 George Jonsson 2,826
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web03 | 2.8.140916.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