Word uses the same facilities as Excel and Access, though it’s a bit tougher to see how web services fit with Word. Unlike spreadsheets or databases, word processors rarely have discrete fields for entering particular data, and users don’t typically expect calculations to happen (except perhaps for spell-checking) as they work on a document. Still, if you’re reading this section you may have a critical use case in mind, so it’s worth exploring how to integrate web services with Word.
One new feature of Word, the Research Pane, makes heavy use of web services. Unfortunately, it does so by requiring people who want to provide information to the Research Pane to create web services that meet the pane’s expectations. Creating web services is far beyond the scope of this book, but a tutorial on creating services for the Research Pane with Visual Studio.NET is available at http://www.devx.com/codemag/Article/18214?trk=DXRSS_XML.
To demonstrate, the example uses a form letter, combining some regular text with text form fields entered from Word’s Forms Toolbar. (The Insert → Fields menu option only lets you enter fields with calculated values, so the Forms Toolbar is definitely the way to go.) The form letter looks like Figure 9-23; hopefully your own form letter will be slightly more normal.
Figure 9-23. Adding the USZip service to the Word document