This afternoon at TechEd, Zeyad Rajabi demonstrated some of the ways developers can use the Open XML SDK to read and write Open XML documents.
He started with the basics, such as how to create a hello-world document (as shown on MSDN), then progressed to real-world scenarios such as a web site for creating customized sales contracts. That demo (attached) builds on the template that Tristan Davis created in his post on the Word team blog that first described how content controls work.
One cool thing in the attached demo is the button that creates 100 sales contracts at once, to demonstrate the level of performance you can get by creating Open XML documents with the SDK instead of automating the Office clients. On Zeyad’s laptop it took about 1.5 seconds to create 100 documents.
Zeyad also showed off some of the upcoming functionality in Version 2 of the SDK, including a high-level API that provides simple access to the content of XML parts in an Open XML package. I’ll post those samples when we start releasing CTPs of Version 2 this summer.