Chapter 6. Customizing Word Documents
In This Chapter
Coding up a marketing letter generator
Creating specific Ribbons for custom documents
Using Action panes
Microsoft Word is one of the most popular applications from the Microsoft Office suite. The basic idea of Word is create a document, write text, format the document, and perhaps add pictures, tables, and charts. You can then save the document and print it, e-mail it, or even upload it to the SharePoint document library where others can download it, update it, and upload it again, repeating the whole cycle.
With the help of the Visual Studio Tools for Office, you can write customizations that can manipulate documents at almost every point in the document lifecycle. For example, if your work requires you to add certain data to the document before the document is printed, VSTO can help you with that task. If you need to automatically create a PDF version of the document or upload a document to the FTP server each time user saves it, VSTO can help you do all this and more.
Exploring the Word Object Model
You can use the Word object model to access specific methods or properties and change applications' or document behavior, style, and so on. The various objects in the Word object model are arranged in a hierarchical order. At the top of the Word object model is the
Application object. Next is the
Document object. If you drill down even more in both of these objects, you'd see that the Word object model is gigantic, with hundreds of objects ...