Link to home
Create AccountLog in
Avatar of ol muser
ol muserFlag for United States of America

asked on

MS Office Redistributable PIA

Hi Experts,

I have a requirement to export contents of a datagridview to a word document with tabular formatting.

I found this great article http://support.microsoft.com/kb/316384 that uses Microsoft Word Object Library. Everything works OK, but in development. Once I moved it to production it threw the following exception:

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Interop.Word, Version=8.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Environment:
Development - WinXP, Office 2003, Visual Studio 2008 using C# for this project
Production: Same as dev or Win 7 64bit with Office 2010.
I get the same exception on both machines. All the target machines have Office installed on them , mostly Office 2010 on Win 7

So I browsed the internet to find some information and landed on the pages about  redistributable PIAs. That makes me wonder about a few things:

1) Is there an assembly that I need to install on the target machines for this to work? I can see that the COM library that I reference in the project during development is available in both DEV as well as PROD machines. So what is that additional assembly that I need to install?
2)Some articles talk about running a .msi file. Instead I would prefer just an DLL that I could register. This is because we have a release software that can handle DLLs, OCx files etc.

3) Or is there some other route I need to pursue?

thanks!
ASKER CERTIFIED SOLUTION
Avatar of Kent Dyer
Kent Dyer
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account