Fabrikam Account Executive Performance Appraisal for Word 2002

Fabrikam Account Executive Performance Appraisal for Word 2002

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
 

Charles Maxson
OfficeZealot.com

July 2002

Applies to:
     Microsoft® Word 2002

Summary: The Fabrikam Office XP Web Services Integration (OWSI) Sample solution connects users with XML Web service data while working within Microsoft Office applications. The Fabrikam Account Executive Performance Appraisal for Word 2002 is an example solution that incorporates XML Web services data to facilitate the document creation process. (2 pages)

Usage and Technical Overview

One of the challenges of creating documents is locating information and integrating that content seamlessly within the assembling process. The Fabrikam Account Executive Performance Appraisal for Word 2002 is a Microsoft Word template that demonstrates how that process can be simplified. The template uses the Fabrikam Office XP Web Services Integration Client Object Library to retrieve data from Web services and then by applying Microsoft Visual Basic® for Applications (VBA), renders the data in an immediately useful format for the user.

For more information on the Fabrikam OWSI Client Object Library, see the accompanying document Technical Overview of the Fabrikam Office Web Services Integration Sample Solution.

The template, which simulates the documentation process for employee performance appraisals, has all the same characteristics of a common Word template including integration in the Word user interface for new documents and its ability to spawn off copies of itself. When the template is loaded as a new document by the user, its Document_New event calls a routine named ProduceTemplate (found in the modActionsWD module) which prompts the user for the document parameters about the review process, namely who is the employee using their employee ID and what are the start and end dates of the review period.

The parameters are then used to retrieve the Web Service data using the Fabrikam OWSI Client Object Library. The ProduceTemplate routine actually makes two different calls for data to the Fabrikam OWSI Client Object Library. The first returns details about the employee, such as job title, office location and e-mail address. Those results are placed into a Word table located in the General Information section of the template.

The second data call has a few distinguishing elements. It returns an array of data back from the Fabrikam OWSI Client Object Library that represents the account executive’s sales performance data. The subroutine ProduceTemplate passes that data as an array to another subroutine named InsertChart which uses Automation and the Microsoft Excel object model to create an Excel chart and to perform mathematical computations with the data. Then the Chart object and resulting math provided by Excel worksheet functions are entered into a Word table in the Appraisal template. Figure 1 shows the results of both data calls in the template:

Aa140316.odc_fabrikamowsi_perfapraisal_01(en-us,office.10).gif Aa140316.odc_fabrikamowsi_perfapraisal_02(en-us,office.10).gif

Figure 1. The Fabrikam Account Executive Performance Appraisal template populated with data.

Show:
© 2016 Microsoft