VSTO 2005 SE add-in for Outlook 2003 & Outlook 2007?

M

Michael

I have written an Outlook 2003 shared add-in, and it seems to run pretty
well in Outlook 2007. I am planning on migrating it to VTSO 2005 SE. I'd
like my add-in to run equally well in Outlook 2003 and Outlook 2007.
However, if it's running in Outlook 2007 I'd like to be able to take
advantage of some of the new features, like using RibbonX instead of a
toolbar that's placed on the Add-ins tab on an Inspector window.

Is this possible?

Michael
 
K

Ken Slovak - [MVP - Outlook]

It's completely unsupported, but if you set up for an Outlook 2003 VSTO 2005
SE addin and use the Outlook 2003 PIA and then change the Office reference
to an Office 2007 reference you can do what you want. Of course you would
only be able to support the Outlook 2003 object model using early binding
and could only use late binding for methods and properties added in Outlook
2007. Outlook 2007 events you couldn't handle at all.
 
M

Michael

Ahh... I suspected as much.

I am writing in C#. What would be the mechanics to get an Outlook 2007
reference in this scenario? The PIA's can only be installed on a system
with that version of Office, and you can only have one version of Outlook
installed at a time (if I understand correctly). Would I need two
development environments; one with Office 2003 to create the add-in using
the Outlook 2003 PIA and another with Office 2007 to change the reference?

If I didn't take this unsupported approach, would I instead have to refactor
my code into two add-ins (with a lot of common code), build each on
different build machines, and install the appropriate one based on the
version of Outlook installed?

Michael
 
K

Ken Slovak - [MVP - Outlook]

In that scenario you would not have a reference to the Outlook 2007 PIA, you
would have one for the Outlook 2003 PIA. You would need to have installed
the Outlook 2003 PIA's either before installing Office 2007 or add them at
some other time. You can certainly have multiple versions of the PIA's
installed, I have both 2003 and 2007 on some of my dev machines and some of
my friends have PIA versions for Outlook 2000, 2002, 2003 and 2007 installed
on the same machines.

The official scenario is to develop 2 versions, one for 2003 and one for
2007. That would let the full support for each version be used. If you
develop using VSTO for an Outlook 2003 addin it will work on Outlook 2007
but of course then would not support the ribbon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top