|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
[Error]Could not load file or assembly 'Microsoft.Office.Interop.Word, Version
Hi,
I created a VB.NET application that opens a word template and overlays a txt file on top of it to be printed. It works fine on my computer but when other attempt to run it they get the following error could not load file or assembly 'Microsoft.Office.Interop.Word, Version = 11.0.0.0 Any thoughts? |
|
#2
|
||||
|
||||
|
I'm going to leap before I look, but my guess is that you built the app on your computer with one version of Word installed, but the other computer has a different version -- or doesn't have MS office installed either. .NET is going to attempt to load a specific version of the assembly (.DLL) that it was built with.
Now that I've leap, I'll go look:
__________________
Wolffy ------------------------ Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Rework for your specific environment may be required. Void where prohibited by law. Not valid in California. Your mileage may vary. Not FDIC insured |
|
#3
|
||||
|
||||
|
Compile the code with all the DLLs "Copy Locally" options set to true (so that they show up in your bin folder. This would include the office Interop DLL and everything else in there. That should do the trick.
|
|
#4
|
||||
|
||||
|
Yup, I was on my way back here to post basically the same thing. When preparing to run the app on another computer, you will need the referenced .DLLs as well as the .EXE -- just wasn't sure the DLL was distributable, or came as part of MS Office (and thus may be in the GAC or otherwise installed in Profile Files)
Last edited by Wolffy : July 17th, 2008 at 10:25 AM. |
|
#5
|
|||
|
|||
|
Quote:
Thanks Wolffy & Carliviris I had come across needing to change "Copy Locally" to true in my own searching but didn't know how to change it in VB 2005. I found it and set all the references = to "True" now. It works on other computers now. Your assistance was much appreciated. |
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > [Error]Could not load file or assembly 'Microsoft.Office.Interop.Word, Version |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|