Microsoft Corporation
October 1996
Improved Programming Capability
New and Improved Object Models
Microsoft Office 97 Applications Programmability Enhancements
Microsoft Access 97 Programmability Enhancements
Microsoft Excel 97 Programmability Enhancements
Microsoft PowerPoint 97 Programmability Enhancements
Microsoft Outlook 97 Programmability Enhancements
Microsoft Word 97 Programmability Enhancements
This document is a guide to the new and enhanced programmability features in the Microsoft® Office 97 suite.
Microsoft Office is not only the best set of productivity applications for all types of users, but it is also a development platform for building custom business solutions. Today, more than one million developers are creating solutions based on Microsoft Office applications.
Microsoft Office 97 enhances and extends the features that make it possible for developers to build custom solutions with Microsoft Office. Microsoft Office 97 improves on the development foundation strategy first introduced in Office 4.x and continued with Office for Microsoft Windows® 95 in three key areas:
Visual Basic for Applications is a shared development environment that enables developers for Microsoft Office to create custom business solutions. Visual Basic for Applications includes a language engine, a powerful editor, an Object Browser, and debugging tools. Microsoft Office 97 provides developers with more depth and flexibility in building custom solutions with the extension of Visual Basic for Applications and improvements to the development environment.
Visual Basic for Applications is now included in Microsoft Word and Microsoft PowerPoint. This inclusion makes it much easier for developers to create custom solutions using each Microsoft Office product and to reuse code across the applications. Moreover, with the recent licensing of Visual Basic for Applications to third parties, developers will be able to use standard tools to capture the functionality of Microsoft Office and third-party software products to build vertical business solutions that share a high degree of consistency for users.
The integrated development environment of Visual Basic for Applications is an entirely new environment for developers for Microsoft Office. The most significant change is that the new Visual Basic Editor exists outside the host application window. This enables developers to write code in Visual Basic for Applications and simultaneously view the results of their programming in the host Office application. Although the IDE exists outside the application window, it runs in the same memory space as its host, thereby benefiting from tight integration for event handling, as well as enhanced performance. The IDE also provides the following:
Figure 1. Visual Basic Editor
The IDE of Visual Basic for Applications includes a code window for the document, for any document sections that support code behind them (for example, Microsoft Excel sheets), and for each code and class module and form in the project.
Drag-and-drop functionality has been implemented throughout the editing environment. Developers can drag code and variables between code windows, into the Watches window, into the Locals window, and across projects.
Figure 2. Project Explorer
The Project Explorer displays the project components (specifically, forms, modules, and references) associated with each open project in an outline view. Each project appears as a new root in the outline control, enabling easy switching among different documents' projects for developers working on multiple projects simultaneously. A project exists for each open document and template.
The following project components are shown in the tree view:
Figure 3. Properties window
The Visual Basic Editor has a Properties window that displays the properties of Microsoft Office documents, forms, and controls. The Properties window can also be shown in the host application's window. For example, Word uses the Properties window to display properties of ActiveX controls that are embedded in a Word document.
The Properties window has two tabs: Alphabetic and Categorized. The Alphabetic tab view provides an alphabetical list of properties. The Categorized tab view provides a list of properties grouped by category (for example, all properties related to color, font, or position). These categories can be expanded or collapsed in the Properties window.
Figure 4. The Debug menu
Visual Basic for Applications includes new and enhanced debugging tools to help the developer identify compile errors, program logic errors, and run-time errors. The debugging tools in Visual Basic for Applications include a Locals window, a Watches window, and an Immediate window. The Locals window also includes a Call Stack Browser that shows the current variable and enables the developer to jump to procedure definitions and references.
Figure 5. The Object Browser
The Visual Basic Editor has an improved Object Browser. The browser differentiates between built-in properties, custom properties, methods, event handlers, and user-defined procedures, as well as indicates globally accessible members. The browser also shows function return types, parameter names and types, and user-defined types and constants. Hyperlink jumps to referenced objects enable easy navigation of the object hierarchy. New to the Object Browser is the ability to search for objects and members across type libraries.
Visual Basic for Applications, version 5.0, brings IntelliSense technology to the developer, providing on-the-fly syntax and programming assistance and reference. The developer can choose to turn these automated features off and access them on demand through the Visual Basic for Applications menu or with keystroke combinations. The following features are available while in the code window, as well as from the Immediate window:
Figure 6. Quick Info
Figure 7. List Properties/Methods
Figure 8. List Constants
Figure 9. DataTips
Figure 10. Margin Indicators
An Edit toolbar provides quick access to the Block Comment and Uncomment feature, which enables developers to select blocks of code and, with the click of a button, comment out the entire selected block of code.
Developers need the ability to distribute their solutions in a secure and protected form to prevent modification to their code base. Projects associated with a Microsoft Office document can be protected without restricting access to the rest of the document. This protection is achieved by setting a protection property on the document in the property sheet. Developers using Microsoft Access can also remove the source code from databases that they distribute to others, thereby reducing the size of the database and protecting their intellectual property. For more information, see "Remove Source Code" in the Microsoft Access 97 section, later in this document.
Developers can set compilation flags within their code to control the resulting behavior of the application. For example, developers may wish to include debugging code or custom messages during the development phase that they would not want end users to see. Conditional compilation enables developers to create multiple compilations of their application easily by setting flags in their code.
Visual Basic for Applications now includes support for class modules. A class module can be thought of as a template for a user-defined object. Within a class module, developers can add public procedures that define custom methods and properties for the object. When an instance of the class is created, developers can apply these custom methods and properties as they would for any object. Modules can be shared across projects through drag-and-drop or export and import functionality or from within a Visual Basic–based automation server.
Figure 11. ActiveX controls menu
All of the Microsoft Office applications support ActiveX controls, formerly called OLE controls or custom controls. ActiveX controls are prebuilt, reusable software components that enable developers to add rich interactive capabilities easily to their Microsoft Office solutions. In Microsoft Office 97, ActiveX controls can be placed on Microsoft Forms or directly on Microsoft Office documents. More than one thousand ActiveX controls are available today from third-party vendors.
Figure 12. Microsoft Forms
Microsoft Excel, Microsoft Word, and Microsoft PowerPoint share a powerful new Forms Designer, Microsoft Forms, which enables the developer to create custom dialog boxes. Because these applications use the same Forms Designer, developers learn how to create custom dialog boxes only one way for all three applications, and custom dialog boxes designed in one application can be shared with another.
Forms support the architecture for the next generation of ActiveX controls and provide the following benefits:
Figure 13. Toolbox
The toolbox can be customized to display all registered controls in the system. Developers can fully customize the Microsoft Forms toolbox:
A second toolbox is used to place ActiveX controls directly on Microsoft Office documents. Developers can maintain separate toolboxes for managing controls for forms and controls for documents.
At the center of the Microsoft Office development platform is the functionality of each Microsoft Office product that is available to developers through Automation. Features such as charting in Microsoft Excel or the database features in Microsoft Access are available to developers as building blocks to create custom solutions. Microsoft Office provides developers 100 percent coverage of the feature sets in each application, enabling them to create unique solutions in significantly less time. Also, Microsoft Office 97 provides to the developer more than 550 objects for reuse.
The developer can reuse the discrete pieces of functionality built into a Microsoft Office application through the application object model. An object model is a conceptual map or representation of an application's functionality depicting the hierarchy of the objects exposed by an application. Microsoft strives to provide developers consistency with object models to simplify the process of accessing components.
New components, such as the Office Assistant, OfficeArt, and command bars share both code and their overall structure within each application. This consistency enables developers to work easily in different Microsoft Office applications, as well as to share code among the Microsoft Office applications. In Microsoft Office 97, more than 50 percent of the objects are shared, resulting in increased code reusability and improved product performance.
New functionality is introduced in Microsoft Office 97 that benefits end users by providing more features and benefits developers by providing more objects to use to their greatest advantage. For example, the Microsoft Outlook™ desktop information manager provides a new set of full-featured objects that developers can use to provide scheduling and contact-management functionality. The Visual Basic for Applications 5.0 IDE and Microsoft Forms also expose their functionality through object models, enabling customization of the editor and forms environment. New object models are also provided for OfficeArt, The Office Assistant, Office command bars, and FileSearch.
OfficeArt is the feature name for the new drawing and graphic tools in Word, Microsoft Excel, and PowerPoint. The new tools replace the existing drawing toolbars in each of these applications, and the code base is shared, so the user interface is identical across the three applications. Additionally, Microsoft Graph accesses the OfficeArt fill dialog boxes and can apply OfficeArt fill effects to objects in graphs.
The new drawing and graphic tools make all the higher-end features of PowerPoint 95, such as gradient fills, available across Office 97. However, Office 97 also features rich new capabilities such as built-in WordArt, 3-D effects, and more than 100 AutoShapes.
The object model for OfficeArt is fully integrated into Word, Microsoft Excel, and PowerPoint, just as the OfficeArt tools are integrated in the user interface of the applications. Unlike other Microsoft Office components described in this section (such as Office command bars and the Office Assistant), each application contains the OfficeArt object model with its own unique integration features. A core 90 percent of the model is identical across the three applications, and approximately 10 percent of the model is composed of properties, methods, and subobjects that are specific to each application.
Microsoft Office 97 introduces a new type of Help component—the Office Assistant. The Office Assistant, the Assistant's balloon, and all the items inside the balloon are controlled programmatically through the Assistant portion of the Microsoft Office object model. Each of the following items are represented in Visual Basic through the Assistant object.
The following illustration shows the Office Assistant, the balloon, and all the programmable objects inside the balloon.
Figure 14. Microsoft Office Assistant
Developers can use the Office Assistant in solutions to get a user's attention, customize the Assistant's balloons to offer help in specific areas, or use the controls on the balloons to run Visual Basic for Applications procedures.
In Microsoft Office 97, toolbars, menu bars, and shortcut menus are all controlled programmatically through one type of object—command bars. Developers can modify any built-in menu bar or toolbar and create and modify custom toolbars, menu bars, and shortcut menus. Because toolbars and menus are included in command bars, developers use the same kind of controls on each one. For example, the docked toolbar shown in the following illustration contains three buttons.
The menu shown in the following illustration contains the same three commands displayed as menu items.
In Microsoft Office 97, menu bars and toolbars can contain menus. The floating toolbar shown in the following illustration contains three buttons and a menu with the same three buttons displayed as menu items.
In Visual Basic for Applications, buttons and menu items are represented by CommandBarButton objects. The pop-up controls that display menus and submenus are represented by CommandBarPopup objects. In the following illustration, the control named Menu and the control named Submenu both are pop-up controls that display a menu and submenu, respectively. The menu and submenu both are unique command bar objects with their own set of controls.
In Microsoft Office 97, edit boxes, drop-down list boxes, and combo boxes can be added to any command bar. These three types of controls are all represented by CommandBar ComboBox objects.
A new Application FileSearch object has been added to provide access to all the searching power of the File Open and Advanced Find capabilities of Office applications. Like the File Open dialog box, FileSearch uses Find Fast indexes, when available, to make searching much faster. With FileSearch, developers can create customized search forms that take advantage of the powerful indexes and the search engine available in all Microsoft Office applications.
At present, custom solutions integrate seamlessly with the messaging application programming interface (MAPI), Open Database Connectivity (ODBC), and local area network–based (LAN-based) technologies to support distribution and access of enterprise data. However, Microsoft Office 97 incorporates and exposes several new technologies that allow developers to take more effective advantage of the connected environment. New features and technologies in Microsoft Office 97 provide seamless integration to intranet and Internet environments and increase power and flexibility in accessing corporate data.
The new Web features in Microsoft Office 97 (including full hyperlink and searching capabilities) are available through the object model library. Developers can create powerful solutions that incorporate all the benefits of the Internet with the safety of a closed network. For example, with a custom-built intranet solution, an IS manager can define the Web search range on a server and control what files may be retrieved and the users who may retrieve them.
Figure 15. Office Web
The Web features in Microsoft Office 97 are integrated consistently within all the application object models. Office-based Web documents are ordinary Microsoft Office documents—Word, Microsoft Excel, and PowerPoint—not HTML documents.
Data Access Objects (DAO) is the object model through which developers create data access solutions with the Microsoft Jet database engine. In Microsoft Office 97, a new version of DAO supports the following features in the new Jet 3.5 database engine:
DAO 3.5 introduces a new client/server connection mode called ODBCDirect. ODBCDirect establishes a connection directly to an ODBC data source without loading the Microsoft Jet database engine into memory. ODBCDirect is useful in situations that require specific features of ODBC. ODBCDirect provides fast access to remote data (on ODBC-compliant databases) and provides support for the following:
To help companies take advantage of Microsoft Office as a universal client to enterprise systems, Microsoft Office supports common industry standards, including the following:
ODBC | ActiveX | SGML |
ODMA | Notes/FX 1.1 | NotesFlow |
MAPI | VIM | TAPI |
HTML | SNA | AS400 |
In addition to the major changes listed earlier in this document, numerous other enhancements make developing with Microsoft Office 97 even easier. On the following pages are descriptions of those enhancements, organized by product.
Microsoft Access 97 includes hyperlinks to help developers easily connect their application to the Internet or an intranet. A hyperlink can define a jump to a location on the Internet or on an intranet, to an object in a database, or to a document on the same computer or on another computer connected by a network.
Microsoft Access provides a new hyperlink data type that can contain a hyperlink address. Users define a table field with this data type to store hyperlinks as data in a table.
Hyperlinks can also be stored on a form or report. Three types of controls can contain hyperlinks—the command button, the label control, and the image control.
Microsoft Access 97 includes three types of class modules—basic class modules, form modules, and report modules. A class module can be thought of as a template for a user-defined object. Within a class module, a developer can add public procedures that define custom methods and properties for the object. When an instance of the class is created, these custom methods and properties can be applied as they would be for any object.
One of the most powerful features in Microsoft Access is its ability to store Visual Basic for Applications code directly behind forms or reports. However, in reviewing sample databases and other customer research, Microsoft found that many developers don't always need this power. Many forms and reports are simple data-management forms and have no code behind them.
Microsoft Access 97 now creates forms and reports that are "lightweight." These lightweight objects do not have a Visual Basic module behind them, nor are they part of the Visual Basic for Applications project. Thus, when opened, the objects load faster than traditional objects containing code. By default, all new Microsoft Access forms and reports are lightweight. The instant that code is added to a form or report, it becomes a traditional form or report object. Further, Microsoft added a new property to forms and reports called HasModule, which toggles between a traditional and lightweight form.
Databases created using the Database Wizard in Microsoft Access 97 take advantage of this new lightweight form functionality to create databases that perform better. The Database Wizard intelligently opts to create lightweight forms whenever possible. If code is required only for navigation purposes behind a command button, the Database Wizard uses a hyperlink as the means to launch that form rather than instantiating a new code module.
Expanding the available options for forms and reports in Microsoft Access 97 enables users to build forms and reports, without code, that can perform as much as 50 percent faster.
Make MDE is a new feature in Microsoft Access 97 that allows developers to build and distribute more secure Microsoft Access applications and improve performance. Make MDE strips the Visual Basic for Applications source code from a Microsoft Access application and converts the file to a database with an .MDE extension. The .MDE database can be opened and used in Microsoft Access, but users cannot change the design or create new objects. Make MDE prevents the application from decompiling and helps protect the intellectual property of the developer.
Figure 16. Developers make .MDE files using the Make MDE File command on the Database Utilities submenu.
If a database contains code written in Visual Basic, saving it as an .MDE file compiles all modules, removes all editable source code, and compacts the destination database. Code written in Visual Basic will continue to run, but it cannot be viewed or edited, and the size of the database will be reduced because the code was removed.
Figure 17. Partial replication
Partial replication enables the developer to create a replica that contains only a subset of records in the full replica. With partial replication, only the necessary data gets replicated, rather than the entire database.
For example, a business might store its entire sales database at its headquarters and replicate only regional data to its regional offices across the country. A separate replica can be created for each regional office that contains only the data relating to that region. The database at headquarters would be the design master with which each replica is synchronized.
Advantages of partial replication
Partial replication can help restrict access to data. In the case of a sales database, partial replication can help ensure that people in a regional sales office don't view sales data for other regional offices. Although partial replication can be used to restrict access to records, it isn't a substitute for a security system.
Partial replication also has benefits for replicating data over LANs and wide are networks (WANs). By restricting which data is replicated, partial replication can reduce the amount of data transferred over a LAN or a long-distance carrier. This can reduce network traffic and lower telecommunications costs.
Microsoft Access 97 supports integration with various source code control providers, including the Microsoft Visual SourceSafe™ version control system. Visual SourceSafe is available as an add-in in the Microsoft Office Developers Edition. The add-in is compliant with the standard source code control interface; thus, any source code control provider that supports the interface, including PVCS or Visual SourceSafe, can now integrate with Microsoft Access 97.
By integrating source code control in Microsoft Access, teams of developers can work collectively on a single Microsoft Access database application and maintain code integrity. With source code controls, developers can do the following:
Source code control allows developers to view differences in their Microsoft Access database objects, such as changes in the switchboard form illustrated in Figure 18.
Figure 18. Source code control
More than ever before, Microsoft Excel is a powerful platform for building custom solutions to meet specific business needs. Rather than expending resources on writing low-level code, companies are investing in solutions that use the built-in power of Microsoft Excel for data analysis, charting, and presentation.
More than 500,000 solution developers use Microsoft Excel as the platform for building custom solutions for specific business needs. Microsoft Excel 97 will continue to be the best spreadsheet development platform, with improvements in capacity, end-user programmability, IDE, forms capability, true event-driven programming, support for ActiveX technologies, increased programming control for PivotTable® dynamic views, and taking advantage of the Data Map object model.
One of the top three requests on the Microsoft product wish line for Microsoft Excel is to increase the capacity of Microsoft Excel worksheets, whether it be the number of characters in a cell or the number of rows on a worksheet. Developers have consistently requested this increase in capacity so they can manage large workbooks—especially in solutions in which Microsoft Excel brings in large amounts of data from an external database.
In Microsoft Excel 97, the cell capacity, number of rows, and number of points per series in a two-dimensional chart has been increased as shown in the following chart.
Microsoft Excel 95 | Microsoft Excel 97 |
255 characters per cell | 32,767 characters per cell |
16,384 rows | 65,535 rows |
4,000 points per series (2-D chart) | 32,000 points per series (2-D chart) |
The most common usage of a spreadsheet is for entering and analyzing data. In the past, there was no way to control or validate data entry. Microsoft Excel 97 now offers users a way to define rules in a worksheet without programming. With data validation, those who create templates for data entry (for example, expense reports, invoices, and purchase orders) can set up validation rules for cells and ranges without writing custom code.
Data validation enables developers to do the following:
Figure 19. Data validation
Figure 20. User applies data validation rules . . .
Figure 21. . . . and warns the user that the entered data is invalid
Data validation ensures that the person entering the data will properly complete the worksheet. If the Microsoft Office Assistant is active, the input messages and the error alerts are prompted by the Assistant. Also, reviewing of forms is reduced so that users can focus on the content rather than on data-entry errors.
Visual Basic for Applications in Microsoft Excel 5.0 and Microsoft Excel 95 had event handling—the ability to watch what the user is doing and react appropriately. Microsoft Excel supports 14 "quasi-events" such as OnEntry, OnCalculate, and so forth. Microsoft Excel 97 features much richer event handling in terms of the number of events available as well as the specific objects to which triggering code can be attached. In addition, the interface to interact with these events is consistent with Visual Basic and with Microsoft Forms. As a result, developers for Microsoft Excel have more flexibility and control in responding to user actions.
PivotTable is a powerful analysis tool that gives users a large amount of flexibility to view their data from different dimensions. While users like this power and flexibility in the user interface, solution developers want programmatic access to automate and control PivotTable dynamic views through code. Microsoft Excel 5.0 and Microsoft Excel 95 provided the ability to control PivotTable functionality via Visual Basic for Applications; Microsoft Excel 97 dramatically extends PivotTable controls by exposing properties and methods in its object model for bulletproofing, memory and cache management, formatting, and external queries. For example, developers now have programmatic access to the PivotTable cache so they can create, delete, and determine cache size. Developers can also turn off PivotTable recalculation. Finally, extensive protection of PivotTable can be implemented for secure access. Now, controlling PivotTable functionality is more flexible than ever. Solution developers can use these new properties and methods to build richer reporting solutions.
In Microsoft Excel 95, Data Map exposed only one method, RefreshMap, for the custom solution developer. In Microsoft Excel 97, an object model for Data Map allows custom solution developers to add basic geographic data visualization to their solutions. This object model makes most of the capabilities that are available to end users available to developers as well.
Figure 22. Data Map
Code behind documents allows Microsoft Office documents to use the event-handling model in Visual Basic for programming controls. This event-handling model allows the programmatic control of "events" on the document. Using this event-handling model exposes most document, workbook, and sheet events to the developer. Twenty events are associated with a workbook and seven events are associated with any particular worksheet, giving the developer significant control over user interaction with the application.
Figure 23. Events on Microsoft Office documents
Events can have parameters passed by the event caller. These parameters can be used to specify the object within a container that actually fires the event. For instance, the cell range that was clicked can be determined as a parameter of the SelectionChange event on a worksheet. In another instance, the WindowActivate and WindowDeactivate events can be placed on a workbook and pass the window object as a parameter.
The application object has events that fire after any workbook or worksheet event fires. This allows for features that customize Microsoft Excel. For example, a company may want to replace the PivotTable feature with its own multidimensional pivot engine to manage double-click events on special PivotTable dynamic views. Events on the application enable the developer to add an event that would run for any interaction with a worksheet.
Microsoft PowerPoint 97 is the sixth major release of the world's most popular presentation graphics software program. This release adds Visual Basic for Applications, version 5.0, and improved functionality to PowerPoint. The object model has been enhanced to provide consistency with the other Microsoft Office applications and to ensure full access to all of the new functionality in PowerPoint 97.
PowerPoint 97 offers the following areas of programmability:
PowerPoint 97 provides a robust application development environment, making it the best presentation package for custom solutions.
PowerPoint 97 exposes the vast majority of its feature set and functionality in the object model. Additions to the PowerPoint 97 object model also include Office 97 components and their associated object models, such as command bars, document properties, Office Assistant, and OfficeArt.
Consistency among the applications in the name and function of key events, methods, and properties makes it easy for users to find the object they need as they scroll through the Visual Basic for Applications Object Browser. A number of additions and changes have been made to the PowerPoint object model so that it is even more consistent with the other Office applications.
Note OLE Automation of charting. The charting module in PowerPoint 97 supports OLE Automation, allowing for automated solutions that can import and export charts from PowerPoint. The charting module can even push data into or pull data out of the underlying worksheet. This enables powerful custom automation of information such as presentations of sales data and financial results in executive information systems. The data, chart, and formatting elements of the chart are exposed, making it easy for custom solutions to include powerful graphical representation of data in PowerPoint 97 slides.
PowerPoint 97 has a robust Visual Basic for Applications implementation consistent with the other Office 97 applications, including Visual Basic Editor and Microsoft Forms. Developers creating applications in Visual Basic will be able to take full advantage of their knowledge of Visual Basic and apply it to creating custom dialog boxes, features, and add-ins for PowerPoint 97.
Office 97 will allow a user to place and program ActiveX controls on a presentation. This ability allows users to add powerful and customizable controls to their presentations. PowerPoint 97 provides a user interface to view and change properties of the control. This user interface will support both the control's properties and the container's object properties, such as position and size, in the same Properties window. The Visual Basic Editor exposes the code module that holds the event handlers for the control.
With Visual Basic for Applications, forms, and ActiveX controls support, PowerPoint 97 enables the following:
PowerPoint 97 will be the first version of PowerPoint that provides a macro recorder, an important tool that enables user automation of repetitive tasks and automatically generates Visual Basic for Applications code that can then be modified. Macro recording functionality across the Microsoft Office applications presents a consistent user interface and functionality to users so that they can learn how to do it only once and apply that knowledge across the other applications.
Third parties and developers can take advantage of the added support for add-ins in PowerPoint 97. Customized functionality can now be written and installed, adding custom features to the PowerPoint 97 menu and toolbar structure and thereby greatly extending the range of functionality that users receive from PowerPoint 97.
Now, more than ever before, corporate users are faced with an overwhelming volume of information. The arrival of the Internet on the corporate desktop has opened new vistas for users, enabling them to extend their reach beyond traditional corporate boundaries, but it has also brought an increased level of complexity to their everyday business life. Corporate users today don't need more information, they need solutions for managing, sharing, and analyzing information. Now, with Microsoft Outlook 97, users can develop such solutions quickly and easily using the Microsoft Outlook application design environment—so information becomes useful, rather than unwieldy.
The rapid evolution of Internet technology has also clouded the future of corporate communications. In an uncertain and changing market, corporations can no longer afford to take the risk of committing resources to costly long-term business solutions, only to arrive at a dead-end solution. Plus, as corporations have downsized, IS resources have dwindled, leaving departments and workgroups to fend for themselves in terms of developing business solutions. With Microsoft Outlook 97, designers can build industrial-strength applications in days, instead of months, so corporations can get the solutions they need without spending time and money on expensive programming resources. In addition, the Outlook design environment is integrated with Office 97 and Microsoft Exchange Server, so application designers can build and implement solutions for proven technologies with the confidence that these technologies won't disappear tomorrow.
Finally, as corporations have decentralized their operations, system administrators are challenged with the task of managing an ever-increasing number of applications developed at the workgroup level. As such, they need a way to provide centralized storage and security for applications and information, as well as an easy way to integrate the applications into the overall business environment. As a workgroup client, Microsoft Outlook 97 runs on the Microsoft Exchange Server, so any applications developed with Microsoft Outlook 97 can take full advantage of the central administration, replication, and security features of the Microsoft Exchange Server.
The value of using the Outlook application design environment to build information-sharing groupware and mail-enabled solutions can be summarized in five key areas.
In addition, Outlook offers the ability to link forms to Web pages, so application designers have a great deal of flexibility in creating Internet/intranet applications. For example, a designer can link a "For More Information" form to a corporate Web page. This form can be preaddressed to a Potential Customers public folder so that when a user who is browsing the Web opens and completes the form, the information is automatically routed to the Potential Customers public folder where it can be shared and responded to by members of a workgroup or by the entire organization
As an application design environment, Outlook offers tight integration with Office 97, the groupware and administration capabilities of the Microsoft Exchange Server, and the messaging capabilities of the Internet. This paper details the features of the Outlook application design environment and shows how it can be used to develop information-sharing and groupware solutions to streamline business processes and enhance communication in an organization.
As a workgroup client, Outlook provides several personal management tools, such as Calendar, Tasks, and Contacts, that can greatly add to a user's productivity. While these modules provide great benefit for the individual user, their value can be dramatically increased when users share information in these modules through the use of public folders and Internet connectivity.
Application designers can create a public folder based on a built-in Outlook module. Once located in public folders on the Microsoft Exchange Server, built-in modules become instant groupware because the information in their folders can be shared among the workgroup. Also, custom code and custom forms are not necessary—the instant groupware application can take advantage of the existing forms and behavior of the built-in module. As a result, built-in modules can be used for scheduling group events, managing group tasks, and sharing and maintaining a customer contact list among a workgroup.
Calendar, Tasks, and Contacts modules can be customized—without programming—to meet the specific needs of a workgroup or organization. For example, an application designer can create a generic Calendar public folder and then add custom views to the Calendar folder so that the module can be used specifically for entering and viewing the schedule of training classes for a workgroup.
The following sections provide a brief overview of how the built-in modules can be customized and used in an organization to improve workgroup communication.
Calendar
The Outlook Calendar module combines the functionality of Microsoft Schedule+, plus additional features, with the groupware capabilities of Outlook. When located in the Mailbox or Personal folder, the Calendar module enables users to create personal schedules, create reminders, or set up meetings. When the Calendar module is copied to the Microsoft Exchange Server, however, it can be used for sharing group schedules, posting the significant events in a marketing kickoff campaign, making a class schedule publicly available, or posting company holidays in a public folder.
Figure 24. The Calendar Module is located in the public folders so that the class schedule can be viewed by all members of the organization. In addition, users can copy specific appointments to their personal Calendar.
Figure 25. The instructor can double-click an item and update class information, while the user can open the item and get more detailed information about a particular class.
Contacts
When a Contacts folder is created in public folders on the Microsoft Exchange Server, workgroup members can add to, update, and share a list of contacts. For example, the sales department can share a list of leads, or the entire company can share a list of vendor contacts.
In the following example, a custom Marketing Materials Tracking view is created by adding two fields, Not Interested and Materials Sent, to the view. This view lets members of the Marketing department track correspondence with potential customers without ever opening a form. As shown in the figure below, if a prospective customer wants to receive information from the Marketing department, the user can enter the date she sent it in the Material Sent column in the view. If the customer is not interested in the material, the user can click a Not Interested check box directly in the view to notify other users not to contact the customer.
Figure 26. The Contacts module is transformed into a Marketing Material Contacts application.
Tasks
The Task module lets users keep track of their personal to-do lists and project schedules. When the Task module is created in public folders, a workgroup can share a common task list that shows who's responsible for tasks, as well as the status of tasks.
Using the task module, a project manager can create a public Task folder. Individual users can then enter the tasks that they are required to complete as their part of the project. When users finish a task or make significant progress on it, they can update the task item in the public folder, thus allowing the product manager to get an overall view of the progress of a particular project.
In the past, when application development was the domain of IS departments, end users often waited forever for a custom solution, only to discover that when it arrived, it wasn't what they asked for and it was next to impossible to change. Now, with the easy-to-use Outlook application design environment, designers can develop their own solutions—without programming. Making changes to views and forms is usually both fast and simple.
The Outlook Forms Designer is a 32-bit environment that's built directly into the product, so opening the Forms Designer is as easy as opening a form in Outlook and clicking Design Outlook Form on the Tools menu. In addition, users can easily switch between Design and Run mode while working on a form. Outlook also provides a variety of features that provide a significant improvement over the current Microsoft Exchange Forms Designer environment, including:
The Outlook Forms Designer provides a wide assortment of layout features to speed application development and give forms a professional appearance.
Figure 27. With the Outlook Field Chooser, designers can use built-in fields or they can create new user-defined fields. Outlook provides a full-featured toolbox to which the designer can add a full complement of custom or ActiveX controls.
When creating applications, designers can base their forms on one of four standard types:
Figure 28. The standard appointment form is transformed into a Technician Schedule form for a corporate Help Desk application.
Because the Contacts, Tasks, and Calendar forms were covered earlier in this paper, this section will focus on Message, Post, and Office 97 Document forms. Each of these three forms support all the features of standard Microsoft Exchange forms, so designers can build forms with the certainty that the functionality they need, including digital signature and encryption, will be available. Details of the features of these three types of forms is provided in the following sections.
Using the Mail Message form as a base, application designers can build custom forms for structuring information, requesting services, or collecting information from coworkers or from customers. Users can send and receive mail message forms within the enterprise or across the Internet.
When used with a public folder, the message form provides a powerful tool for collecting customer information. For example, designers can create a Product Feedback form and specify a public folder as the return address. They can then send the form to customers, who can install it in their form library. When customers have product feedback, they can open the form, fill it out, and automatically return it via the Internet to the company's Product Feedback public folder.
Here are a few other ideas for creating Mail Message forms using the Outlook Forms Designer.
In the following example, shown in the Figure 29, the Vacation Request form is filled out by a user and sent to a supervisor. When the supervisor receives and opens the Vacation Request item, he or she can click a button on the Vacation Request form to approve or deny the request and automatically route the response to the sender. Note also that the form takes advantage of several features of the Outlook design environment, including AutoName Check for the To box and automatic calculation of Total Days based on a formula defined with the Access Expression Service.
Figure 29. Vacation Request form is based on the Mail Message form and lets the user mail a request within the company or across the Internet.
Figure 30. The Help Ticket form is also based on the Mail Message form but this time the Read Page formatting has been totally customized to create a completely different look from the Help Ticket compose form.
Discussion forms, also known as Post forms, can be used in conjunction with a public folder to build participatory applications that help break down traditional time and space boundaries between members of an organization. Using the Discussion form as a base, designers can build applications that allow users to conduct online discussions, which can be especially useful for virtual corporations or for flexible workgroups where members work together on a project, but work different hours.
For example, let's assume three people, all in different cities, are working together on planning a new product. A user in Seattle can submit a product suggestion to a Wish List folder on the Microsoft Exchange Server. A user in Chicago can then use a customized Discussion form to post a response to the suggestion. Meanwhile, another user in Denver can follow the conversation because the items are arranged in the folder by conversation topic.
Here are a few ideas of the types of discussion forms designers can build.
Figure 31. The Post form is modified to conduct conversations about new product ideas.
With Office Document forms, you can build forms based on existing templates in your organization. For example, assume you already have Microsoft Word templates in your organization, such as Beta Agreements, Contractor Agreements, or Job Estimates. With the Outlook Forms Design environment, designers can essentially wrap these templates in an Outlook form wrapper, so the template's document properties can be promoted in a public folder. This enables designers to create document library folders for a wide variety of purposes, such as storing contracts, product specifications, job estimates, Microsoft Excel worksheets, or PowerPoint presentations.
In the following example, the Office form contains a Microsoft Word Beta Agreement template. To send a beta agreement to a customer, a user opens the Beta Agreement form from the Contract Library folder. She can then fill out the appropriate fields in the Word template and send the document form over the Internet to the customer.
Figure 32. The Beta Test Agreement form is composed of the Outlook form combined with the Microsoft Word Beta Test Agreement template.
When the form is returned, it can be routed to the Contract Library public folder, where its fields can be shown in a public folder. In addition, the fields can be used to organize documents in a custom view.
Figure 33. Custom Properties in the Beta Agreement template, including Customer, Date, and CoLocation, are used to create column headings in the Beta Test Agreement view.
The Outlook workgroup client provides a Folder Design environment that improves upon many of the design features offered in the Microsoft Exchange client. With Outlook, designers can do most of the design work for views directly in the folder. For example:
Figure 34. The Views Design environment provides features that allow designers to construct views without opening a dialog box.
Research studies report that groupware is most commonly used for online discussions, tracking, or document library applications. Therefore, Outlook is strategically focused on these three most frequently used types of applications. Each of these types of applications is discussed in more detail in the following sections.
Discussion folders are often referred to as "online bulletin boards." These folders serve as a central location for users to submit, share, and respond to ideas and information. One of the most valuable features of a discussion folder is known as conversation threading, and it enables designers to create rich views that show the history of responses to a particular item. The usefulness of conversation threading is demonstrated in the Job Candidate folder, where interviewers' hiring recommendations for a candidate are organized and posted in a public folder, so the person in charge of hiring can get an overall view of the workgroup's impression of the candidate.
Figure 35. The New Job Candidate item is posted to the Job Candidate folder. After workgroup members interview a candidate, they submit their hiring recommendation by responding to the Candidate item. The responses, as shown in the illustration, create a conversation thread.
Here are a couple of other folder ideas that might help a company improve relations with its customers.
Outlook folders are not limited to storing mail messages, so users can store graphic images, OLE objects, URLs, voicemail, and documents in a Reference folder. For example, a development workgroup can create a Specification Library for storing, organizing, and reviewing product specifications. In addition to documents and mail messages, users can store Web-site references in folders, so a list of useful Web sites can be shared and updated by a workgroup. In the following example, the Aero Web folder is used to store Web sites for the aircraft industry. From the Microsoft Internet Explorer, users can save their favorite Web sites as URL files and then drag the files into the Web Reference folder. Other users can then simply click the item in the public folder to go to the Web site.
Figure 36. Web Reference folder. The user clicks an item in this folder to activate the Internet Explorer and go to the Web URL.
Tracking applications lets the user record and view information that is constantly updated. The following example shows a Customer folder that allows a Help Desk worker to log and track Customer Service Request items. Notice the All By Status view is selected in the view box so that Customer Service Request items are grouped according to whether they're open, on hold, or closed.
Figure 37. Customer service items are posted in the folder. When the status of a job changes, the user can open the folder, change the status, and then save the item in the folder.
The Outlook Forms Design environment provides powerful tools that enable the designer to add intelligence and automation to forms and views. These tools include:
Both the Expression Service and VBScript Editor are described in more detail in the following sections.
Using the Access Expression Service, the designer can add functionality to fields. For example:
Figure 38. The value in the Total Days field is automatically calculated by a formula.
Using VBScript and the Outlook Forms Designer Script Editor, designers can automate forms to save users time and to make forms easier to use. For example, in the Business Card Request form shown in Figure 39, when the user clicks the Corporate Address check box, the address is automatically added to the lower business card portion of the form. In addition, when users enter their Name and Title in the form, these values are also automatically filled in the business card portion of the form. Figure 40 shows the Visual Basic script, in the Script Editor window, that automatically fills in the fields in the lower portion of the form.
Figure 39. The Business Card Request form utilizes VBScript to fill in the bottom portion of the form for the user automatically.
Figure 40. Using the Script Editor, VBScript is added to the form to fill in the lower portion of the form for the user automatically.
Often in organizations, applications follow a progressive path. First they're developed at the workgroup level to solve a specific problem. Then the application becomes adopted by other workgroups and requires additional functionality. Finally, the application is implemented enterprisewide and requires even more functionality to meet the broader needs of the organization. Outlook provides for this kind of scenario by offering a flexible approach to application development. With the broad range of tools and capabilities in Outlook, designers of all skill levels can meet their business solution needs.
The following shows the different levels of Outlook application development, starting with the easiest level and progressing to the most advanced level:
Outlook forms can be extended using ActiveX controls or Visual Basic for Applications.
Designers can add Visual Basic for Applications code to Office documents, and then drag the document into an Outlook folder to wrap the document in a form. For example, a designer can create a Mileage Report worksheet in Microsoft Excel that calculates total miles and the reimbursement amount due. In addition, the designer can add Visual Basic for Applications macros to the worksheet that writes the mileage record to a Microsoft Access or other ODBC-compliant database. Next, the designer can drag the worksheet into an Outlook folder to wrap the worksheet in an Outlook form. The designer can then add a Cover page, for user information, and a Status page to the Mileage Report form.
At run time, users can open the Mileage Report form from the Organization forms library. They can then fill it out and submit it to a supervisor for approval. When the supervisor approves the report, Visual Basic for Applications code can automatically write the mileage report record to a database.
In many cases, designers will need to create applications that integrate database information into forms. For example, a designer might want to create a Library Materials Order form that enables the user to query the Library Materials database for books or magazines on a particular subject. To accomplish this, the designer can drop an ActiveX control on the form and then set the properties for the control to perform queries on the SQL Library Materials database.
At run time, when users open the form, they can then use the ActiveX control(s) to query the database. After users have selected the materials they want, they can send the request to the library for processing.
Figure 41. The selection of the manufacturer and model type in the computer field of the Equipment Request form determines what Web page will be displayed in Internet Explorer 3.0 inside of the Outlook form.
In many cases, organizations or workgroups can solve business problems or increase productivity simply by installing one of the sample applications that ships with Outlook. Although these applications are fully customizable, they are designed to be run "out of the box" and can be quickly installed and implemented in an organization.
The following provides examples of some of the sample applications (subject to change) that will be available with Outlook.
Message applications
Discussion applications
Tracking applications
Office forms
With the proliferation of application development at the workgroup level, organizations need a standard platform for application development, as well as a way to centrally manage applications. The Microsoft Exchange Server provides this for Outlook applications by offering Internet connectivity, a reliable messaging infrastructure, integrated groupware capabilities, and centralized storage, security, and administrative capabilities.
Central application management: The Microsoft Exchange Server provides a public folder object store where folders, forms, and items can be centrally stored for enterprisewide access. Application designers can make their applications available throughout the company simply by copying a folder to the public folder area on the Exchange server.
Microsoft Exchange Server security: Using the Microsoft Exchange Server Administrator Program, administrators can define who has access to organizational forms and public folders. In addition, either the administrator or the application designer can set permissions on a public folder to define what rights an individual user has on that folder. Also, because Microsoft Exchange Server runs on Microsoft Windows NT®, corporations get the authentication capabilities of the NT server, further ensuring that only authorized users have access to a company's sensitive information.
Forms and folder replication: Exchange administrators can use the Microsoft Exchange Server replication engine to distribute forms and folders (including calendar, task, and contact folders) throughout the enterprise. The server replication engine manages the distribution of the application and ensures that any changes to forms or folders on one server are automatically reflected on the replicated servers.
Offline use of applications: Users can run Outlook applications offline while working in remote locations. For example, a sales person can use a Contacts folder offline while traveling to view contact information and to enter new information. Remote users can take advantage of the local replication feature of Microsoft Exchange to synchronize their Favorite Folders with the folders on the Microsoft Exchange Server.
Before designing and implementing forms in their environment, application designers should be aware of the following issues.
For detailed information about interoperability and migration, see the white paper, Microsoft Outlook 97: Interoperability With Microsoft Exchange Client, Microsoft Mail Version 3.x, Microsoft Schedule + 95, and Microsoft Schedule + Version 1.0 at http://www.microsoft.com/OutlookDev/Articles/outinter.htm.
Outlook public folders
Outlook supports all the custom public folder view features of Microsoft Exchange Server. Microsoft Exchange Server does not distinguish between Outlook and the Microsoft Exchange client when users open a public folder, so Outlook and Microsoft Exchange client users can have access to a common set of folders
Note: MS Mail 3.x users cannot access Outlook public folders.
Non-table views: Microsoft Exchange client users can display Outlook "table" views (views that consist only of rows and columns) if the Convert To Exchange Views check box is selected in Folder Properties for the Outlook folder. However, Exchange client cannot display Outlook nontable views such as the day, week, and month view in the calendar. Nor can it display the card, icon, or timeline views. When Outlook users and Microsoft Exchange client users access the same set of public folders, Microsoft Exchange client users cannot display any nontable views created by Outlook users.
Outlook forms
Outlook users can run forms created with the Microsoft Exchange client Forms Designer, but Microsoft Exchange client users cannot run forms created with the Outlook Forms Designer.
In a mixed client environment (Microsoft Exchange client—16-bit and 32-bit Windows®—and Outlook), designers must carefully consider which clients will be using the forms they create.
If forms will be run by both Microsoft Exchange client and Outlook users, forms should be developed using the Exchange Forms Designer.
If forms will be run only by Outlook users, the forms should be developed using the Outlook Forms Designer.
Advantages of using Outlook forms:
One of the most significant areas of integration for Microsoft® Word 97 is the inclusion of Visual Basic for Applications, version 5.0. Visual Basic for Applications replaces WordBasic and enables Word to share a common programming language with the rest of the Office applications. A consistent programming model across all the Office applications means developers need to learn only one way of programming. Visual Basic for Applications exposes developers for Word to a greater programmatic interface and makes Word programmable from other applications using automation.
Word 97 has a significantly enhanced object model that describes the functionality of Word. As a result, Word is programmable from other applications using Automation. In addition, the object model provides developers with excellent programmatic access to Word's feature set directly from within Visual Basic for Applications. Features that require programmers to access dialog boxes can now be accessed directly using the comprehensive object model.
Word automatically migrates code created in previous versions of Word to code written in Visual Basic for Applications. When opening a template containing WordBasic macros created with previous versions of Word, Word automatically converts all such macros into Visual Basic. Thus, all existing macros will work when templates are loaded into Word 97.
Word 97 now hosts ActiveX controls. This enables the creation of powerful documents and forms from within Word.
In addition to providing extensive print and online form-building capabilities, Word 97 enables the creation of active documents, using ActiveX controls. These controls are integrated with the Word forms design interface—they are fully programmable in Visual Basic Editor for customizable, responsive forms.
Word 97 supports 40-bit RC4 encryption of password-protected documents, which is the strongest exportable encryption.
In Word 97, macros can be stored within documents, so developers don't have to deliver templates along with documents to give users access to macros.