Contact me  
Home Architecture Patterns BizTalk OBA OSLO Security Sharepoint Visual Studio WCF ASP.NET Workflow Tools Tutorials

Visual Studio Tools for Office – Getting Started

Introduction

VSTO (Visual Studio Tools for Office) provides a development environment on top of Visual Studio to create OBAs (Office Business Applications) or Office client customizations.

The current version is VSTO 3.0 SP1 which comes with VS 2008 SP1. There is a version compatible to VS 2005 also. VSTO allows developing add-ins and customizations for both Office 2003 and Office 2007 though the support for Office 2007 is much better.

As part of supporting OBA development, VSTO provides development environment for creating two types of solutions:

·         Office client add-ins and customizations

·         SharePoint workflow solutions.

For Office clients mainly two types of custom solutions can be developed:

·         Application Add-ins: They get installed on top of Office client applications and thus help in customizing the default behavior and look/feel of office client products.

·         Document Level customizations: Instead of Add-ins which get installed at application level, these get attached to a particular document instance only.

Deployment features supported:

·         ClickOnce for deployment of VSTO solutions including deploying Primary Interop Assemblies.

·         .NET Framework Client Profile supported.

Preparing development computer for Office Development

Following components are required on development machine to do Office development, to be installed in below order:

·         Microsoft .NET framework 3.5 sp1 or later.

·         Office 2007 client for which solutions needs to be developed.

·         Primary Interop Assemblies

·         Visual Studio Tools for Office.

 

 

 

 

Visual Studio Tools for Office is included with the following editions of Visual Studio:

 

·         Visual Studio 2008 Professional

·         Team Edition for Architects

·         Team Edition for Database Professionals

·         Team Edition for Developers

·         Team Edition for Testers

 

Preparing end user computer for Office Solutions

Following components are required on end user machine to deploy and run Office solutions, to be installed in below order:

·         Microsoft .NET framework 3.5 sp1 or later.

·         Office 2007 client for which solutions needs to be developed.

·         Primary Interop Assemblies

·         Visual Studio Tools for Office Runtime.

 

Primary Interop Assemblies (PIA)

PIA enable managed code to interact with Microsoft Office application’s COM-based object model. They need to be installed and registered in Global Assembly Cache (GAC).

The two ways of installing PIA are:

·         Perform full Microsoft Office installation.

·         PIA redistributable package: http://www.microsoft.com/downloads/details.aspx?FamilyID=59daebaa-bed4-4282-a28c-b864d8bfa513&DisplayLang=en

Visual Studio Tools for Office Runtime

VSTO runtime is required to be installed on end user computers to run the office solutions.

Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime) is for the 2007 Microsoft Office system. The Setup program is VSTOR30.exe.

http://www.microsoft.com/downloads/details.aspx?FamilyId=54EB3A5A-0E52-40F9-A2D1-EECD7A092DCB&displaylang=en

The runtime includes managed assemblies that provide the communication layer between custom Office solution and the Microsoft Office application, and unmanaged components that the application uses to load custom Office solution. 

Assemblies in the Visual Studio Tools for Office 3.0 Runtime

The following table lists the assemblies that are included in the Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime).

Assembly name

Description

Microsoft.Office.Tools.Common.v9.0.dll

·         The AddIn base class for application-level add-ins.

·         Classes for creating actions panes and smart tags in document-level customizations.

·         Classes for creating custom task panes in application-level add-ins.

·         Classes for creating Ribbon customizations.

Microsoft.Office.Tools.Excel.v9.0.dll

Provides host items and host controls for Excel document-level customizations.

Microsoft.Office.Tools.Outlook.v9.0.dll

Provides classes that you can use to create custom form regions in Outlook add-ins.

Microsoft.Office.Tools.Word.v9.0.dll

Provides host items and host controls for Word document-level customizations.

Microsoft.Office.Tools.v9.0.dll

·         The RemoteBindableComponent class, which provides the data binding capabilities for host controls in document-level customizations.

Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll

·         The CachedAttribute attribute and ICachedType classes, which you can use to cache data objects in a document-level customization.

·         Exceptions that can be thrown by the Visual Studio Tools for Office runtime.

Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0.dll

The ServerDocument class, which you can use to programmatically attach customization assemblies to documents and to access the cached data in documents.

Microsoft.VisualStudio.Tools.Office.Runtime.v9.0.dll

The AddInSecurityEntry and UserInclusionList classes, which you can use to create user inclusion list entries to grant trust to a Visual Studio Tools for Office solution for the 2007 Microsoft Office system. For more information, see Trusting Office Solutions by Using Inclusion Lists (2007 System).

Microsoft.VisualStudio.Tools.Office.AppInfoDocument.v9.0.dll

Microsoft.VisualStudio.Tools.Office.Contract.v9.0.dll

Provide classes that are part of the Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime) infrastructure. These classes are not intended to be used directly from your code.

 

 

VSTO Project Types

The various Office 2003 project types supported by VSTO 2008 SP1 are following:

The various Office 2007 project types supported by VSTO 2008 SP1 are following:

The following table shows which applications you can use with each project type.

Project types

2007 Microsoft Office system

Microsoft Office 2003

Document-level customizations

Word 2007

Excel 2007

Word 2003

Excel 2003

Application-level add-ins

Excel 2007

InfoPath 2007

Outlook 2007

PowerPoint 2007

Project 2007

Visio 2007

Word 2007

Excel 2003

Outlook 2003

PowerPoint 2003

Project 2003

Visio 2003

Word 2003

SharePoint workflows

SharePoint Server 2007

Not supported

 

The following table shows which project types provide each feature.

Feature

Projects types that provide the feature

Actions pane.

All document-level projects.

ClickOnce deployment.

Application-level and document-level projects for the 2007 Microsoft Office system.

Custom task panes.

Application-level projects for the following applications:

·         Excel 2007

·         InfoPath 2007

·         Outlook 2007

·         PowerPoint 2007

·         Word 2007

Custom XML parts.

Document-level projects for the 2007 Microsoft Office system.

Application level projects for the following applications:

·         Excel 2007

·         PowerPoint 2007

·         Word 2007

Data cache.

All document-level projects.

Expose an object in a document-level customization to VBA code in the document.

Document-level projects for the 2007 Microsoft Office system.

Expose an object in an application-level add-in to other Microsoft Office solutions.

All application-level projects.

The following host controls:

·         Chart

·         ListObject

·         NamedRange

·         Content

·         Bookmark

All document-level projects.

Application-level projects for Word 2007 and Excel 2007.

The following host controls:

·         XMLMappedRange

·         XMLNode

·         XMLNodes

All document-level projects.

Outlook form regions.

Application-level projects for Outlook 2007.

Ribbon customizations.

Document-level projects for the 2007 Microsoft Office system.

Application-level projects for the following applications:

·         Excel 2007

·         Outlook 2007

·         PowerPoint 2007

·         Word 2007

Smart tags (using the Visual Studio Tools for Office programming model).

All document-level projects.

Application-level projects for Word 2007 and Excel 2007.

Visual document designer.

All document-level projects.

 

Related Articles

 

AddThis Social Bookmark Button


Most Popular Articles

 

Most Recent Articles