Share via


Running Solutions in Different Versions of Microsoft Office

If your customer base uses both Microsoft Office 2010 and the 2007 Microsoft Office system, you can use Visual Studio 2010 to develop solutions that work in both versions of Office. If you need to create a solution that can also run in Microsoft Office 2003, you must use an earlier version of Visual Studio.

Running Office Solutions Created By Using Visual Studio 2010

To create a solution that can run in both Microsoft Office 2010 and the 2007 Microsoft Office system, the project template you use depends on the target framework of the solution:

  • If you target the .NET Framework 4, you can use project templates for either version of Office to create solutions that run in either version of Office on end user computers. However, the solution can only use features and APIs that are available in both versions of Office.

  • If you target the .NET Framework 3.5, you can use a project template for the 2007 Microsoft Office system to create a solution that also runs in Microsoft Office 2010. The solution can only use features and APIs that are available in both versions of Office. When you target the .NET Framework 3.5, solutions you create by using Microsoft Office 2010 project templates can only run on end user computers that have Microsoft Office 2010 installed.

The following table illustrates these scenarios.

Version of Office targeted by the project template

Target .NET Framework of the project1

Versions of Office that can run the solution

Required runtime on end user computer

Microsoft Office 2010

.NET Framework 4

Microsoft Office 2010

2007 Microsoft Office system2

Visual Studio 2010 Tools for Office Runtime

Microsoft Office 2010

.NET Framework 3.5

Microsoft Office 2010

Visual Studio 2010 Tools for Office Runtime

2007 Microsoft Office system

.NET Framework 4 

or

.NET Framework 3.5

Microsoft Office 2010

2007 Microsoft Office system

Visual Studio 2010 Tools for Office Runtime

1. The .NET Framework version that your project targets is required on end user computers for your solution to run. For example, if your project targets the .NET Framework 3.5, the .NET Framework 3.5 is required on end user computers. In this example, your solution will not run if only the .NET Framework 4 is installed on end user computers.

2. In this scenario, the solution will run without errors in the 2007 Microsoft Office system only if it does not use features that are new in Microsoft Office 2010. 

Running Office Solutions Created By Using Previous Versions of Visual Studio

Microsoft Office applications can also run solutions created by using previous versions of Visual Studio. In some cases, these solutions require different versions of the Visual Studio Tools for Office runtime. Different versions of the Visual Studio Tools for Office runtime can be installed side-by-side on the same computer. 

The following table shows which versions of Microsoft Office can run solutions created by using previous versions of Visual Studio, and which versions of the Visual Studio Tools for Office runtime and the .NET Framework are required for each solution. 

Edition of Visual Studio used to create the solution

Version of Office targeted by the project template

Versions of Office that can run the solution

Required runtime on end user computer

Required .NET Framework version on end user computer

Visual Studio 2008 Professional

or

Visual Studio Team System 2008

2007 Microsoft Office system

Microsoft Office 20101

2007 Microsoft Office system

Visual Studio 2010 Tools for Office Runtime1

or

Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime)

.NET Framework 3.5

One of the following editions of Visual Studio 2005 with VSTO 2005 SE2 installed:

  • Visual Studio 2005 Tools for Office

  • Visual Studio Team System 2005

  • Visual Studio 2005 Professional

2007 Microsoft Office system

Microsoft Office 2010 (32-bit only3)

2007 Microsoft Office system

Visual Studio 2005 Tools for Office Second Edition Runtime

.NET Framework 2.0, .NET Framework 3.0, or .NET Framework 3.5

Any of the following editions of Visual Studio:

  • Visual Studio 2008 Professional

  • Visual Studio Team System 2008

  • Visual Studio 2005 Tools for Office (with or without VSTO 2005 SE2 installed)

  • Visual Studio Team System 2005 (with or without VSTO 2005 SE2 installed)

  • Visual Studio 2005 Professional with VSTO 2005 SE2 installed

Microsoft Office 2003

Microsoft Office 2010 (32-bit only3)

2007 Microsoft Office system

Microsoft Office 2003

Visual Studio 2005 Tools for Office Second Edition Runtime

.NET Framework 2.0, .NET Framework 3.0, or .NET Framework 3.5

1. Microsoft Office 2010 applications include the Visual Studio 2010 Tools for Office Runtime. Therefore, these applications always use the Visual Studio 2010 Tools for Office Runtime rather than the Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime) in this scenario. Applications in the 2007 Microsoft Office system can use the Visual Studio 2010 Tools for Office Runtime or the Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime).

2. VSTO 2005 SE is a free Visual Studio add-on that provides application-level add-in project templates for Microsoft Office 2003 and the 2007 Microsoft Office system. It can be installed with Visual Studio 2005 Professional, Visual Studio 2005 Tools for Office, or an edition in the Visual Studio Team System 2005. For more information, see Visual Studio 2005 Tools for Office Second Edition.

3. Office solutions that require the Visual Studio 2005 Tools for Office Second Edition Runtime are not compatible with 64-bit versions of Microsoft Office 2010. To run these solutions in the 64-bit edition of Microsoft Office 2010, you must upgrade the project to Visual Studio 2010 or to a Visual Studio 2008 project that targets the 2007 Microsoft Office system.

See Also

Tasks

How to: Create Office Projects in Visual Studio

Concepts

Visual Studio Tools for Office Runtime Overview

Visual Studio Tools for Office Runtime Installation Scenarios

Running Solutions in Different Versions of Microsoft Office

Other Resources

Designing and Creating Office Solutions