Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm facing the following problem when trying to open the word document from deployment server.

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

I will explain in detail my problem.

Client want to open the report in Office word document and for that I'm calling Microsoft.Office.Interop.word COM compenent(version 12.0.0.0) and everything working fine in my development machine and when I deployed and trying to open it from production server the above said problem rising.

And one more thing my client using Office word 2003( version 11.0.0.0) and other important one is production server not allowed to install any MS Office objects.

Could any one help me where exactly the problem is and what steps to follow to resolve this.


Thanks,
Srinivas Kalagara
Posted
Updated 2-Mar-10 8:24am
v2

1 solution

You won't be able to use the Interop libraries if you can't install Office, because you will get the error you are describing.

It doesn't leave you with a lot of choices (I am assuming you are using word for modifying the document, rather than just doing something like printing it). So here they are as I see them:
  • You can try to get them to allow Word to be installed.
  • You could force the Office XML format for your reports and modify the XML directly.
  • You could change the format to something else like crystal reports or Acrobat and then rewrite.


If you are simply PRINTING the document, you could use the Word Viewer and Compatability Pack and that might solve your problem.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900