views:

210

answers:

2

I would like to have my application function with both version of Office (as well as Outlook within those). I understand I can't install them full in parallel (Outlook being the fight really).

In specific, our application opens up Outlook, fills some information and loads up the contacts (so they can select who to send it to), and some other basics. If it matters, the OS varies from Windows SP, Server 2003, Server 2008, and Vista.

We're considering going to Office 2007 (going to have to sooner or later whether we like it or not, so I'm preparing sooner rather than later) and if I install Office 2007 I find I can't use the older interop dll (app won't compile). I'm left to assume that if I use the 2007 interop that 2003 won't work -- which is what we're on now.

Other apps do this but my Google foo fails me and my StackOverflow foo is about the same.

Any thoughts on how to get Visual Studio to allow me to code for both?

edit: I actually forgot about this question however I have the answer.

The answer was the cause from something else. The Interop worked just fine however another bit of code referenced another version specific reference (of Excel, to be specific) instead of Interop. Having never worked with Interop before, I just assumed it didn't matter and they were one and the same. Turns out I was wrong. Once we removed all the referenced and re-added back normal Microsoft.Office.Interop references, it all Just Worked (TM).

A: 

The app won't compile? What are you talking about? What is the error? If you install the Office desktop suite, it should not affect the compilation of your code.

You're not saying that the app doesn't function. You're saying the compile breaks. How is that possible?

It could be that you've not installed the PIAs, or the older PIAs got uninstalled, or when you installed the new office you got new PIAs and there is some incompatibility.

The latter option there seems implausible to me.

I am thinking it is something else. But seeing how long this Q has been dormant, I suppose you have moved on by now.

Cheeso
+1  A: 

Err, so the question can close I'll add the answer here:

The answer was the cause from something else. The Interop worked just fine however another bit of code referenced another version specific reference (of Excel, to be specific) instead of Interop. Having never worked with Interop before, I just assumed it didn't matter and they were one and the same. Turns out I was wrong. Once we removed all the referenced and re-added back normal Microsoft.Office.Interop references, it all Just Worked (TM).

Nazadus