VSTO & .NET & Excel

January 9, 2007

Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part III

Filed under: VSTO & Excel — Dennis M Wallentin @ 9:20 pm

To read previously blogposts on the subject please see:

Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part I

Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part II 

Here in the third blogpost on the subject focus will be on the procedures that make up the utility. In order to take part of the code itself please see the following article at my English site: Creating and Deploying Managed COM Add-ins with VSTO 2005 SE – Part III

The most notable aspect of the code is that in order to access the Excel Object model we need to go via the ThisAddin class:

  • If inside the ThisAddin class we can access it with the statement:
    Me.Application 
  • Code outside the class but inside the project we can access it with the statement:
    Globals.ThisAddin.Application

This is the major different between VSTO solutions and VB.NET (Shared Add-in) solutions (except for the differences in the connection class).

If You download the VBA-solution for the Transition Case and compare it with the code here (that is at my English site) You will see that the differences are not many and/or not that much or…?  

What do You think?

Kind regards,
Dennis 

Advertisements

2 Comments »

  1. Dennis,

    Thanks for this! I was having a real brain cramp trying to figure out how to refer to the Excel application in VSTO before I saw this. Makes it so easy now!

    🙂

    Comment by Ken Puls — January 24, 2007 @ 8:02 am

  2. Ken,

    You’re welcome and I know myself how difficult it can be without a startpoint.

    Kind regards,
    Dennis

    Comment by Dennis Wallentin — January 24, 2007 @ 11:22 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: