Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Office interop: developing with 2003 PIAs on a machine with Office 2007

I have Office 2007 on my dev machine. I have a small app I'm building for a customer server with Office 2003 that needs to do some interop. My program will run as a scheduled task in a nightly batch process.

No matter what I do, I can't find the version 11.0 of the Access interop assembly so that will work on the server.

I've tried explicitly downloading and installing them on my machine. I tried installing the 2007 interop assemblies on the server (a full Office 2007 install is out of the question). I tried several different COM references. I tried looking for the COM object on the server to reference in the visual studio project. And I've tried too many other little things to list them all here.

What's going on here? How can I get this working?

like image 584
Joel Coehoorn Avatar asked Nov 14 '22 15:11

Joel Coehoorn


1 Answers

I've found the only way to do this, even with both versions installed side-by-side, in .Net v2 and above, was to add a reference to the PIA (rather than the COM lib). Frameork v1.1 would actually bind to the correct version, if they were present side-by-side.

like image 77
Rowland Shaw Avatar answered Dec 10 '22 05:12

Rowland Shaw