ActiveX. In the .NET world,
we do not have to deal with registration of components like we do with ActiveX components. We can
simply copy our component to any machine that has the correct version of the .NET Framework installed,
and it will run.
One benefit that we see from this example is minimal code in our project. Let??™s take a look
now at how .NET technologies can actually take the code out of our Excel projects.
Excel in the .NET World
We can??™t code directly in the Excel 2007 VBE to use .NET components, but we can download
tools from Microsoft that will let us create Excel projects from within Visual Studio 2005. VSTO
and VSTO SE each come with a suite of tools that allow us to access various functions within
an Excel project.
VSTO, which interfaces with Office 2003 applications, allows direct access to an Excel
workbook and gives us programmatic control within the managed code environment. VSTO
project templates include the ability to create the following:
CHAPTER 9 n ACTIVEX AND .NET 323
??? Excel workbook projects
??? Excel template projects
??? Word template projects
??? Word document projects
??? Outlook add-in projects
Figure 9-4 shows the Visual Studio 2005 New Project dialog box for Microsoft Office 2003
projects from the original version of VSTO.
Figure 9-4. VSTO Microsoft Office projects
VSTO SE adds some new project types to the toolbox, as shown in Figure 9-5.
Figure 9-5. New project types included in VSTO SE
CHAPTER 9 n ACTIVEX AND .
Pages:
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301