1. Home
  2. Computing & Technology
  3. Visual Basic

Chapter 13 - Microsoft Office Applications and Managing Processes - Part 1

By Dan Mabbutt, About.com

7 of 9

The VSTO Code Example - Page 1

Excel Output

Excel Output

~~~~~~~~~~~~~~~~~~~~~~~~~
Imports System.Windows.Forms
Imports Office = Microsoft.Office.Core
Imports Excel = Microsoft.Office.Interop.Excel
Imports MSForms = Microsoft.Vbe.Interop.Forms

' Office integration attribute.
' Identifies the startup class for the workbook.
' Do not modify.
<Assembly: System.ComponentModel.DescriptionAttribute( _
  "OfficeStartupClass,Version=1.0,Class=ExcelProject1.OfficeCodeBehind")>

Public Class OfficeCodeBehind

  Friend WithEvents ThisWorkbook As Excel.Workbook
  Friend WithEvents ThisApplication As Excel.Application

--->Code continued on the next page

Explore Visual Basic
By Category
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Automating Microsoft Office Applications and Managing Processes - Part 1

©2009 About.com, a part of The New York Times Company.

All rights reserved.