It is remarkably easy to implement sophisticated workgroup applications when you start with standard Outlook modules placed in public folders. If you want to achieve special results for example, if you want to provide unique information you can customize the standard forms. It is important to note that only Outlook 2000, Microsoft Outlook 98, and Microsoft Outlook 97 users can work with customized Outlook forms.
This lesson briefly introduces the Outlook-based application design environment. After that, it demonstrates how to start designing electronic forms and how to utilize intrinsic features of Outlook 2000.
At the end of this lesson, you will be able to:
Estimated time to complete this lesson: 45 minutes
Outlook-based workgroup applications typically consist of three parts: an electronic form, a folder container (usually a public folder), and the folder design (the view, the filters, and the rules). You use electronic forms to create and display specific items. The folder container stores these objects, and the folder design determines how the contents are presented in Outlook. Folder rules and event sinks help with workflow automation, and public folder replication can distribute the data across the organization, as explained in Chapter 18, "Public Folder Replication."
Outlook 2000 supports a variety of different view types: table, timeline, card, day/week/month, and icon. Table views are the classical view type, consisting only of rows and columns. The items are arranged in rows and the columns determine the attributes to be displayed. A good example is the messages view associated with your Inbox. A timeline view, on the other hand, displays the items in chronological order along with work hour information, which is useful for journaling purposes. The card view shows objects in the form of business cards, as in a card file. Your Contacts folder uses this view type. Day/week/month views, in turn, fit best with calendars and are therefore associated with the Calendar folder. Icon views, finally, present items and files as icons similar to Microsoft Windows Explorer. Consequently, this view type is useful for document libraries.
You can add your own columns to existing views or define new views based on Outlook's standard view types. To define a custom view in Outlook 2000, open the View menu, point to Current View, and then select Define Views. Click New or Copy. When clicking New, you will be prompted for the view type. Furthermore, you can associate your new view with a single folder (This Folder) or with all folders of a particular type (All Mail Folders). When you click OK in the Create A New View dialog box, you will see the View Summary dialog box.
The View Summary dialog box allows you to define the following elements for custom views:
Folder home pages, also known as Digital Dashboards, allow you to associate Web pages with mailbox or public folders. To define a home page, right-click the desired folder, select Properties, click on the Home Page tab, and specify a URL in the Address text box. It is a good idea to select the Show Home Page By Default For This Folder check box, in addition, to display the Web page automatically when the user selects the folder in Outlook 2000. Otherwise, the user must first open the View menu, and then click the Show Folder Home Page command.
Folder home pages can replace traditional Outlook views. They are far more powerful than folder views because they allow you to display the folder content together with information from other locations, such as databases or Web sites. A folder home page does not even have to display any folder content at all. For instance, it would be possible to create an Exchange Info public folder and associate it with the URL http://www.microsoft.com/exchange/. Whenever you select this folder, Microsoft's Web page for Exchange-related product information will be displayed (see Figure 21.1).
Folder home pages are displayed in Microsoft Internet Explorer 5.0, which is shown in the right-hand pane in Outlook. Using Microsoft FrontPage 2000, it is easy to design folder home pages. To view and work with the contents of any mailbox or public folder, add the Microsoft Outlook View Control to your Web page. The Outlook View Control is an ActiveX control that gives your users access to the contents of mailbox and public folders based on standard and custom Outlook views.
NOTE
Folder home pages can be included in offline folder synchronization to enable offline use. However, home pages based on Active Server Pages (ASP) technology always require interpreting through a Web server.
Figure 21.1 A public folder home page displaying information from external sources
Server-based rules determine the automatic processing of items that meet certain criteria. For public folders, you can define rules without any programming using the Folder Assistant that is available in Outlook 2000. Right-click the desired public folder, select Properties, click on the Administration tab, and then click Folder Assistant. Using folder rules, you can configure message size limits, forward items with specific attributes (such as a specific word in the subject line), or check other information, such as custom properties of Microsoft Office documents. Because Microsoft Exchange 2000 Server is a client/server system, Outlook 2000 is not required to execute folder rules. The client can disconnect completely, but the server still continues to process new items, reply to them, delete them, or perform any other specified actions.
Besides folder rules, Exchange 2000 Server offers far-reaching support for server-side folder processing based on Microsoft Web Storage System events. For backward compatibility, the Exchange Event Service, which is installed during the Exchange 2000 Server setup process and configured for manual startup, is likewise supported. With Exchange 2000 Server, you should give the Web Storage System preference over the Event Service.
Events occur when items are saved or deleted, when a store is mounted or dismounted, or when a specific time interval has elapsed. You can write event sinks for the Web Storage System in scripting languages, such as VBScript or Microsoft JScript, or using any Component Object Model (COM)-compliant development environment, such as Microsoft Visual C++ or Microsoft Visual Basic. The Web Storage System is introduced in Chapter 23, "Microsoft Exchange 2000 Web Storage System."
In this exercise you will use Outlook 2000 to implement a document management application based on a public folder without designing an electronic form. You will configure custom views and folder rules to display and process documents.
To view a multimedia demonstration that displays how to perform this procedure, run the EX1CH21.AVI files from the \Exercise_Information\Chapter21 folder on the Supplemental Course Materials CD.
To implement a basic document management system
Figure 21.2 Configuring custom views for a document library
Figure 21.3 Configuring a maximum item size for a document library
Exchange 2000 Server is able to determine standard and custom properties of documents stored in mailboxes and public folders automatically. This feature is known as property promotion. You can use these attributes, as well as any standard attributes, to view, sort, and manage shared and personal documents. Likewise, users can use these attributes to configure folder rules, for instance, to define a maximum document size. It is also possible to search across all items in a document library regardless of the document type. With full-text indexing, searches can include the body of documents and message attachments.
Electronic forms can be used with two general groups of applications: stand-alone applications and folder applications. Stand-alone solutions, also known as send forms, are used for direct information exchange between users; you would use a stand-alone form to send another person a specially formatted e-mail message. A meeting request form is a good example of a send form. In folder applications, items are posted to a mailbox or public folder directly. These electronic forms are therefore known as post forms. When items are posted to a public folder, multiple users can share the information.
Electronic forms are the right choice if you want to do the following:
The Outlook Forms Designer is a 32-bit design tool that is tightly integrated into Outlook. You can use it to modify all kinds of existing forms, including the standard Mail Message form, Contacts form, and Tasks form, without the need for any programming language. Outlook forms are not compiled but interpreted by Outlook at runtime.
To launch the Outlook Forms Designer, open the Tools menu, point to Forms, and then select Design A Form. In the Design Form dialog box, select the form that you want to modify, and then click Open. If you want to create a custom form based on a Microsoft Office document, display the form that you want to modify, and then switch it into design mode. To do this, open the File menu, point to New, and select Office Document. At this point, select the desired document type, such as Microsoft Word Document, in the New Office Document window, and then click OK. You will need to specify whether you want to post or send the form. When you make your choice and click OK, a form will be launched containing the selected Office document. In this window, open the Tools menu, point to Forms, and select Design This Form. The design mode shows (Design) on the title bar.
NOTE
You can customize forms for Office documents by modifying the embedded Office document. However, it is not possible to modify the default pages of the form or add new form elements.
It is possible to extend forms using the Visual Basic Expression Service and VBScript. You can use the Expression Service to validate field input or create formulas and combination fields. A good example is a field that determines an expiration date by adding several days to the current date. VBScript, in turn, can add further intelligence to Outlook forms. VBScript lets you launch dialog boxes, open and close other forms, and perform background calculations while users work with your form in the foreground.
Outlook forms are published through forms libraries. On the Tools menu of your customized form, point to Forms, and then select the Publish Form As command. Forms libraries and the installation of electronic forms are discussed in Lesson 2.
As soon as you have switched a form into design mode, you can delete existing fields and add new fields to achieve the desired functionality. Examples of existing fields are the To, Cc, and Sent lines, which display recipient information and a time stamp. Of course, Outlook provides many other additional fields. They are organized by category, which you can examine using the Field Chooser utility. To display this utility, on the Form menu, select the Field Chooser command. This utility allows you to create custom fields if the standard set of attributes does not meet your needs.
You can select a field such as the Message Flag Field from a category of the Field Chooser and place it on a form using drag and drop. You can opt to have new controls aligned automatically on the left side of other fields if they are placed below them. Other alignment options are available on the Layout menu. The AutoLayout feature of Outlook Forms Designer, which is enabled by default, automatically aligns the new fields on the form, no matter where you drop them.
To create new fields, use the New button in the Field Chooser window. In the New Field dialog box, you need to specify a name and a field type, such as Text, Date/Time, Number, or Currency. Depending on the field type that you select, you might also have to define a specific data format using the Format combo box. When you click OK, the custom field will be added to the User-Defined Fields In <Folder> category of the Field Chooser. You can place the new field on your form just like any other field, using drag and drop, and it can also be included in folder views.
You need Read and Write permissions for the currently selected folder to create new fields. As you add your own fields, they are associated with the current folder. Let's say that you have defined a Yes/No field called Invite For Interview in a folder called Job Applicants. You then can add this field to the folder view of Job Applicants, but you cannot use it to extend a folder view of the Inbox. New fields help to organize items only on a per-folder basis: You must create the same field for other folders if you want to extend their views using user-defined attributes of forms messages.
Field validation is a common programming technique used to ensure that users enter valid information in predefined fields. A check is performed when users close a form during a send or post operation. If a field contains an invalid value, users are informed and are asked for valid input. In this situation, the form is not closed.
For example, you might want to create a user-defined field called Applicant Rating for your Job Applications solution to indicate how well a candidate fits an open job position. Users can only enter values from 0 to 5; other values are not allowed. When you place the field on the form, you can enable the field validation feature. No matter which field you are working with, a right-click on the field displays a shortcut menu that offers the Properties command. Selecting this command displays the Properties dialog box. In the Validation tab, select the Validate Field Before Closing The Form check box, and then define a validation formula and specify a notification. The validation formula will check whether the user has entered a valid value. A notification will inform users about input errors.
Outlook forms support ActiveX controls, which can be used to implement advanced features, such as a date and time picker. To add controls, you need to display the control toolbox. Open the Form menu, and select the Control Toolbox command. When you right-click the free area in the Toolbox dialog box, you can select the Custom Controls command, which allows you to include and use any available ActiveX control in your forms project.
You need to keep in mind that the size of your form increases with the number of fields and controls you place on the form. It takes longer to load large forms. If the size of your form was increased dramatically, you may even encounter problems with Outlook's forms cache. To increase performance, Outlook loads custom forms into this cache before displaying them. In Microsoft Windows 2000 Professional, the forms cache is located under \Documents and Settings\<User Name>\Local Settings\Application Data\Microsoft\Forms. The default cache size is 2 MB. To increase the size, in Outlook 2000, open the Tools menu, select Options, and, in the Options dialog box, click on the Other tab. Click Advanced Options, and then click Custom Forms. Increase the value labeled Maximum Space On Hard Disk.
It is a good idea to avoid adding advanced custom controls to electronic forms. Outlook forms are not compiled. Consequently, custom controls do not become an internal part of your form project. Unlike the actual electronic form, you must deploy your custom controls to all workstations manually. Likewise, because forms are interpreted at runtime and not compiled at design time, it is important to install the design-time licenses on all workstations and not just the runtime versions; otherwise, Outlook 2000 may display a warning that license information could not be found and the custom control will not be loaded. It is vital to test your electronic forms on different workstations when using custom controls.
You can disable the Outlook Forms Designer by setting a user-specific REG_DWORD value called NoOutlookFormsDesigner in the Registry in the following location:
HKEY_CURRENT_USER \Software \Microsoft \Office \9.0 \Outlook
If you set this value to 1 and attempt to launch the Outlook Forms Designer, a message box will be displayed informing you that your administrator has made this feature unavailable. Using the Custom Installation Wizard, you can include this Registry value in a customized Outlook installation, which allows you to disable the Outlook Forms Designer for those users that are not supposed to develop custom forms or workgroup applications. The Custom Installation Wizard was introduced in Chapter 8, "Microsoft Outlook 2000 Deployment."