Implementing BibPort with VSTO
Microsoft's VSTO provides a framework that can host plug-ins written in .NET languages within Office programs. The application and its open documents are represented as objects within a VSTO plug-in. This collection of VSTO objects permits manipulation of the program, as well as navigation of the underlying contents of documents in a structured manner. These objects are available for all supported file types used by Office programs in addition to those supported by after-market file conversion filters. VSTO represents an important abstraction that offers a means of processing many documents quickly and easily. To provide access to Word and its documents, VSTO provides a set of objects conforming to the WOM. With this set of objects, you can inspect the contents of a document in a detailed way.
User Interface Elements
BibPort has been ported through three iterations of Visual Studio, beginning with Word 2003 and the first version of VSTO. Although some changes have been made through the first two revisions, the BibPort code base has remained relatively unchanged between Visual Studio 2003 and 2005. The first two versions targeted Word 2003, which used traditional menu-driven systems. Presenting BibPort to users involved inserting a new menu specifically for BibPort functionality. This insertion was accomplished via several lines of code that registered the menu and created the hooks into BibPort at Word startup.
With Word 2007, ribbons replaced toolbars, requiring some change in the creation of these UI elements. Visual Studio 2008 includes a Ribbon Designer that assists in the creation of new ribbons and extensions. Figure 6 demonstrates the evolution from creating menus programmatically to creating ribbons through a wizard. This capability brings menu creation to the same level of point-and-click design that is common in Windows Forms in Visual Studio.