Yesterday, I presented at the Microsoft Office System 2003 event in Wichita, KS. The thing I like about doing these presentations is that I usually learn new things in the process. In this case, I was introduced to the Office Tools for Visual Studio.
Using these tools, I can write managed code to work with an Office document. Currently the tools support Word and Excel, but other products are in development. As an example, I could write some code that queries a Web Service for some information when an Excel worksheet opens. The code can take the results of that query and place the data into the sheet, so the sheet always opens with the most current data.
In another demo for the presentation, I added two command buttons to a spreadsheet, then wrote managed code to respond to the click events of those buttons. One exports the spreadsheet data as an XML document, the other loads XML data into the spreadsheet.
Using the VS tools for Office and the Office System's new XML support, it becomes very easy for developers to build solutions with Office that can also share data with other systems.