views:

297

answers:

2

We have existing VS 2008 VSTO add-ins for Word 2003 and Excel 2003. We are unable to upgrade the Office version at this time.

We have just tried to upgrade our solution to VS 2010 and it converts and compiles fine, but when building and running the add-in we receive a message saying that the required version of Office is not installed.

Is there any way of getting around this issue (without upgrading to Office 2007 or 2010) so that we can use VS 2010 to build this add-in?

+1  A: 

No, unfortunately it's not possible. VSTO 2010 will not compile solutions designed for Office 2003. It is designed to work with with 2007/2010.

To create solutions for Office 2003 you'll need VSTO 2005 on VS2003 or VSTO 2005 SE / VSTO 2008 on VS2008 (in the case of the later, you can also develop for Office 2007).

Otaku
What? I find that hard to believe. What documenation or reference can you provide to back this claim?
AMissico
Sorry to be the bearer of bad news here. http://msdn.microsoft.com/en-us/library/bb772080.aspx
Otaku
@Otaku: There is no mention that VSTO 2010 will not install if Office 2003 is installed. Can you provide the location in the topic? I find this hard to believe because Office, VSTO Runtime, Visual Studio, and .NET all support side-by-side installation.
AMissico
@AMissico: VSTO will not install *at all* if Office 2007 or Office 2010 is not detected during VS2010 install (but you can add it later once you've installed one of those). This is true for no versions of Office, as well as if Office 2003 *is* installed, as well as OpenOffice, Ubuntu in a Virtual Machine, Notepad, Chess Titans or any other program. Go ahead and give it a try and check your error log. I know you're having a really hard time believing this, I don't know why, so it's best to verify it yourself. If you need to develop for Office 2003 and 2007, VS2008 is your platform.
Otaku
@Otaku: Yes, I understand that VSTO 2010 will not install if Office 2007/2010 is not installed, but saying it won't install if Office 2003 is installed is not correct. Therefore, your answer is not correct.
AMissico
@Otaku: "If you need to develop for Office 2003 and 2007, VS2008 is your platform." **You are absolutely correct and this is the correct answer.** I think you should change your answer then I will up vote and Ben Robbins will get his answer.
AMissico
@AMissico: The answer needs to stand, but I'm happy to augment. It's true that VSTO 2010 won't install if Office 2003 is installed. Office 2007/2010 cannot run side-by-side with Office 2003, so you'll have one or the other. If you have the former, VSTO 2010 will install. If you have the later, it won't.
Otaku
@Otaku: Yes, Office 2007 can run side-by-side with Office 2003. I have this configuration now on my laptop. I have done it on four other computers. I have created add-ins with VS2k5 (for Excel and Word) and VS2k8 for (Outlook and OneNote). I do not have an opportunities for Office 2010 development, so do not have the software installed.
AMissico
@Otaku: Outlook has never supported side-by-side installation. This is the only exception that I can remember write now. (OneNote may be another exception.)
AMissico
@AMissico: Yeah, that's right on Outlook. My mistake to say all of Office.
Otaku
Ben Robbins
I agree with @AMissico that the answer should be edited so that it doesn't say VSTO for VS 2010 will not install if Office 2003 is installed (because I know this is wrong from our own experience) and then I will accept the answer because I don't want to mislead others that read this in the future. Thanks again for your replies.
Ben Robbins
@Ben Robbins: I've edited to reflect that VS2010 does not work with solutions designed for 2003.
Otaku
A: 

No. The Office version is tied to the VSTO version which is tied to the Visual Studio version. Since VSTO 2010 does not support Office 2003, you cannot migrate.

Also, you need to be aware that opening a file extension may open the incorrect Office version. For example, on startup the later versions of Office will register themselves into the registry. If you are developing an Excel 2003 VSTO project, but you manually open an Excel 2007 workbook, then 2007 becomes the default. The next time you work on the Excel 2003 VSTO project, it will use Excel 2007. To get back to Excel 2003, you must run excel /regserver.

AMissico