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
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
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