Johan Nordberg

What's the difference between the VSTO templates for addins targeting Excel 2003 and Excel 2007 If I just have Office 2007 on my development machine, can I just change som references and deploy it for Excel 2003 What happens if I open up a Excel 2007 Addin project on a machine with Excel 2003

For the moment I use VS2008 beta 2, but the question also applies to VS2005 and VSTO2005SE.

// Johan




Re: Visual Studio Tools for Office Difference between XL2003 addin and XL2007 addin

Andrew Cherry [MSFT]

Hi Johan -

For the most part, switching references would suffice, with some caveats. However, that's only true for VSTO 2005 (which only targets Office 2003) and VSTO 2005 SE. VS 2008 adds some Office 2007 specific infrastructure pieces which are NOT backwards compatible with Office 2003. However, they will continue to work with Office 20xx; we had to make a breaking change somewhere.

For VSTO 2005 SE Add-ins, however, you should just need to change the PIA references -- you'll need to remove the Microsoft.Office.Interop.Excel.dll version 12.0 reference, and replace it with version 11.0. Same for the Office Core PIA, and any others you might be using.

In most cases, you shouldn't need to make any code changes.

You're probably better off, especially with VS 2008 Beta2, starting with a Office 2003 Add-in project, but you should be able to repurpose a VSTO 2005 SE add-in for Office 2007 to run against Office 2003. You will need to register the add-in differently for Office 2003 and 2007, however.

You will, obviously, lose the Ribbon Designer and Custom Task Pane magic while running on Office 2003; I can't quite recall if the functionality will still work if you run an Office 2003 customization against Office 2007 -- in any case, you would need to hook up the Custom Task Pane support in your own add-in.

For backwards compatibility, Office 2007 does fairly well; for forwards compatibility, Excel 2003 has a few more hurdles.

Hope this helps,

Andrew






Re: Visual Studio Tools for Office Difference between XL2003 addin and XL2007 addin

Johan Nordberg

Thank you for the fast reply!

Sounds like it's best to develop for Excel 2003 directly.

Can I have Office 2003 and Office 2007 installed side by side and still use both project wizards in VS 2008

Maybe I'm better off using a virtual machine

// Johan