views:

317

answers:

2

When using the add-in wizard for outlook add-ins in Visual Studio 2008, I have the choice between creating a add for Outlook 2003 and Outlook 2007 (both using .NET). However, if I chose one of these, the add-in doesn't run in the other version.

What's the best way to create a add-in which runs in both versions?

+1  A: 

Apply a "DRY" (don't repeat yourself) principal and move the logic out of the version-dependent project. Sounds like you'll have to create two projects and target each at a version. Just write the code so that the common classes and behavior can be contained in an independent library and thus referenced by both. Hope this helps.

esabine
+1  A: 

Outlook 2003 add-ins should work in Outlook 2007. I am writing an add-in with VS 2005 that works in both. Make sure you are using the PIA for 2003. If you create your own interop assemblies you will have problems.

I also use a special development machine with only Outlook 2003 and Visual Studio installed. I have other machines with Outlook 2007 for testing.

What errors are you getting when trying to install your 2003 addin on Outlook 2007?

Darryl Braaten