Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
388 | Chapter 12: Introduction to VSTO and Visual Studio 2008 Office Development History To get a better understanding of the roles VSTO and Visual Studio 2008 play, let's take a look at how Office development has evolved. Microsoft Office was created as a set of discrete client applications, each aimed at a specific purpose, including spreadsheets, documents, slide shows, e-mail, diagrams, and so forth. Since then, Office has grown into a framework for developing applications. As an example of this, developers routinely embed Excel spreadsheet functionality into their existing Word-based applications. In other cases, Word's spell checker has been used behind the scenes to add functionality that would otherwise be nearly impossible for routine depart- mental business applications. This functionality is available because all of the Office applications have been designed as consumable COM servers. Visual Basic for Applications (VBA) Although VSTO is a powerful tool, there are still many instances when VBA still might be the ideal (or even pre- ferred) tool. For example, VSTO only supports Office 2003 and Office 2007, so obviously any application development based on older versions of Office should take VBA into con- sideration. Simple macros are still best created using VBA. With that said, VBA does have some shortcomings, espe- cially when it comes to security. Macro viruses spread in epidemic proportions in the late '90s due to the security prob- lems behind Office. Also, debugging and version control was difficult because VBA embeds the code directly behind an individual document or template. Finally, VBA relies purely on Visual Basic syntax. Developers skilled in different lan- guages do not have the option of transferring that knowledge to VBA/Office development.