Lab 1: Creating Projects Using Visual Studio Tools for the Microsoft Office System

 

Lori Turner
Microsoft Corporation

March 2004

Applies to:
    Microsoft® Visual Studio® Tools for the Microsoft Office System
    Microsoft Office Professional Edition 2003
    Microsoft Visual Basic® .NET 2003

Summary: Provides an introduction to creating projects using Microsoft Visual Studio Tools for the Microsoft Office System. (2 printed pages)

Contents

Introduction
Prerequisites
Exercise 1: Collecting Data Using a Windows Form
Exercise 2: Writing Text from an XML File to Bookmarks in a Document
Next Steps

Download the VSTOLabs.exe sample file.

Introduction

The objective of this lab is to familiarize you with creating Microsoft® Office Word and Microsoft Office Excel solutions using Microsoft Visual Studio® Tools for the Microsoft Office System. Both exercises use walkthroughs that are located in the Visual Studio Tools for Office documentation.

Estimated time to complete:

  • Exercise 1: Collecting Data Using a Windows Form - 15 minutes
  • Exercise 2: Writing Text from an XML File to Bookmarks in a Document - 15 minutes

For a link to all labs in this series, see Visual Studio Tools for the Microsoft Office System Training.

Note   The labs in this series are designed to be completed in order.

Prerequisites

To complete these exercises, you need:

  • Microsoft Visual Studio Tools for the Microsoft Office System.
  • Microsoft Office Word 2003 and Microsoft Office Excel 2003, installed from Microsoft Office Professional Edition 2003.

Exercise 1: Collecting Data Using a Windows Form

To get started, complete a Visual Studio Tools for Office walkthrough that creates an Excel solution using Visual Studio .NET.

To complete an Excel walkthrough

  1. Start Visual Studio .NET.

  2. On the Help menu, click Contents.

  3. In the Contents window, locate the Samples and Walkthroughs node in Help.

  4. See the topic Walkthrough: Collecting Data Using a Windows Form.

  5. Create the WinFormInput project as described in the walkthrough.

    Note   When you start the project, choose C:\Labs\Lab1 for the project location. Other labs in this section use these projects; therefore it is important that you use the path that is suggested so that you can follow steps in the subsequent labs.

Exercise 2: Writing Text from an XML File to Bookmarks in a Document

Next, complete a walkthrough that creates a Word solution using Visual Studio .NET.

To complete a Word walkthrough

  1. Start Visual Studio .NET.

  2. On the Help menu, click Contents.

  3. In the Contents window, locate the Samples and Walkthroughs node in Help.

  4. See the topic Walkthrough: Writing Text from an XML File to Bookmarks in a Document.

  5. Build and test the My Word Bookmarks project as described in the walkthrough.

    Note   When you start the project, choose C:\Labs\Lab1 for the project location. Other labs in this section use these projects; therefore it is important that you use the path that is suggested so that you can follow steps in the subsequent labs.

Next Steps

See Lab 2: Adding Functionality to Word Document Solutions in Visual Studio .NET 2003, where you learn how to work with Word 2003 solutions created with Visual Studio Tools for Office, including how to handle Word events and add Web services.

For more information, as well as links to other labs in this series, see Visual Studio Tools for the Microsoft Office System Training.