Updated Help Topics for the Visual Studio Code Name "Orcas" January CTP

The January 2007 CTP of Microsoft Visual Studio Code Name “Orcas”is now available for download in a Virtual PC image or as a self-extracting install. This CTP provides a glimpse of new features in the upcoming "Orcas" release of Visual Studio Tools for Office, including:

  • Application-level add-ins.
  • Document-level customizations for Word 2007 and Excel 2007.
  • VSTO-enhanced content controls for Word 2007 documents.
  • Outlook form regions.

The Visual Studio documentation in this CTP includes a selection of new topics that cover these features. However, some of these topics are missing content or code examples. This week, the VSTO user education team is posting the completed versions of these topics to this blog.

Today’s topic, "Getting Started Programming Application-Level Add-Ins", is a brief introduction to creating application-level add-ins in VSTO Code Name “Orcas”. Tomorrow we will post some topics about content controls in Word, and Wednesday we will post some topics about Outlook form regions. If you have any feedback regarding these topics, please leave us a comment.

********************************************

Getting Started Programming Application-Level Add-Ins

If you are just getting started creating application-level add-ins using Visual Studio Tools for Office, here is what you need to know.

Creating Add-in Projects

You can use Visual Studio Tools for Office to create application-level add-ins for the following Microsoft Office applications:

· Excel 2007

· Excel 2003

· InfoPath 2007

· Outlook 2007

· Outlook 2003

· PowerPoint 2007

· PowerPoint 2003

· Visio 2007

· Visio 2003

· Word 2007

· Word 2003

Visual Studio Tools for Office provides add-in project templates for each of these applications. For more information about how to create an add-in project, see “How to: Create Visual Studio Tools For Office Projects”.

Developing Add-in Projects

When you create an add-in project, Visual Studio Tools for Office automatically creates a ThisAddIn.vb (in Visual Basic) or ThisAddIn.cs (in C#) code file. This file contains the ThisAddIn class, which provides the foundation for your add-in.

The ThisAddIn class includes two default event handlers that you can use to start writing your add-in. To run code when the add-in is loaded, add code to the ThisAddIn_Startup event handler. To run code just before the add-in is unloaded, add code to the ThisAddIn_Shutdown event handler.

The ThisAddIn class also provides access to the object model of the host application. To access the host application, use the Application field of the ThisAddIn class. This field returns an object that represents the current instance of the host application. For example, in an add-in project for Microsoft Office Word, the Application field returns a Microsoft.Office.Interop.Word.Application object.

Next Steps

For information about how to customize the Ribbon in a 2007 Microsoft Office application by creating an add-in, see “Walkthrough: Creating a Custom Tab Using the Ribbon Designer”.

For information about adding an Outlook form region to an add-in for Outlook 2007, see “How to: Add a Form Region to an Outlook Add-in Project” and “Walkthrough: Creating an Outlook Form Region”.