The Forms Designer lets you lay out all the different fields on your form, link them to messaging objects, and designate actions on events. Without any previous programming experience, you can create applications that will make your organization more productive. Many example applications are provided on the Exchange CD-ROM. You can use these pre-designed forms and modify them for your use.
The Forms Designer enables the creation of two types of forms:
Among the potential custom applications you can create are electronic forms. In many organizations there are standard forms routed to specific individuals. Using the Forms Designer, you can create a travel request form, time-off request form, or office supply requisition. These applications take the work out of making simple requests. In addition, with the integration of public folders, the forms are easy to distribute throughout the organization. You no longer have to make sure that everyone has the most up-to-date form, and that they have enough copies. Distributing the forms electronically makes it easier for the user, and for the recipient who receives all the forms. The recipient can easily organize and process all the requests in the universal Inbox.
Another strong suit of the Forms Designer is to maximize the effectiveness of public folders. By designing an application, you can make it really easy to enter data into a public area. A great example of this use is for those organizations that post a lot of memos. Instead of printing out the memos and distributing them through the mailroom or by e-mail into everyone's Inbox, you can just create a public folder called Company Memos, and then write an application that lets the user enter the memo into some structured fields. Once the user executes the form, the memo is posted to an appropriate subfolder under the main Company Memos folder. The subfolder could be based on a field on your form that has a drop-down list of company departments. Everybody wins using this system. The mail room folks have less junk mail to route, the people in the copy room have less to copy (which saves toner), and most importantly, paper is saved, which is good for the environment.
As mentioned throughout this book, the Forms Designer is a client application. It is installed with Schedule+/ and the Exchange Client, as well as Outlook. You may not have installed it when you installed the other components, however. The following list is an installation procedure:
NOTE: Before you install the Exchange Forms Designer on your workstation, please consider using 48MB-64MB of memory. This is especially needed for application development that uses the Visual Basic 16-bit program to extend your applications.
These recommendations directly affect the capability of your development environment.
If you had any previous version of the Forms Designer on your drive, Setup detects it and displays a screen asking you to reinstall, add/remove programs, or remove all. Any forms you create will not be overwritten by any new versions you may install.
Along with the application, all the different sources of help are installed. There are three different sources of help when you are designing applications: Cue Cards, Online Help, and Online Documentation.
These various sources of online help are a great supplement to this chapter. You will get the context-sensitive help you need, and at the same time you'll get more step-by-step tutorials to walk you through all the functions. The online manuals give you access at your fingertips.
Exchange's structure provides for many different uses of the containers in the hierarchy. You can design applications that leverage this flexibility.
In many organizations, several different teams work on different projects. As they get ideas, they usually send out an e-mail to all the people involved. As the weeks go by, everyone winds up with many e-mail and voice-mail messages that have no structure. Many are simply carbon copies, forwarded messages, or replies. Recipients usually must go back and sift through all the messages looking for information.
Some groups use a bulletin board or internal newsgroup to help centralize all the data. The only problem with this solution is that most e-mail packages that provide bulletin board capability have poor security. You can't control who can post, read, or modify. When using Usenet-style newsgroups, you can't control very easily who can read and post. You either would have to set up passwords or host entries for each machine to read or post. It isn't very easy or robust.
Using a custom Exchange application for discussion, you gain all the access control that is inherent in Exchange and NT Server. You can allow only members of the proper teams to access their information. In some cases, you would want to allow read-only access to people in other groups to promote team cooperation. Exchange's public folder structure is flexible enough to enable this.
Using a custom application can structure the data. The forms you create can contain certain fields, and information about threads. The capability to structure information in different views gives the user the ability to choose a report sorted by date, author, or subject. You can also use structure subjects if you want to keep discussions along a certain topic.
Some of the most common uses of discussion applications are customer-support databases, brainstorming applications where team members can input ideas as they come to them, frequently asked questions lists, and meeting summarization applications.
Exchange serves as a great repository of documents and objects as well as e-mail. You can easily write applications that provide easy access to all your standard documents throughout the enterprise. Many organizations have several standard documents, such as policies and procedures manuals, style guides, and computer-usage guidelines. In addition, many organizations have standard Word document templates. These objects can be placed in an Exchange public folder and made available right on the user's desktop.
A few pieces of the Forms environment need to be explained in the scope of the large Exchange picture. These components consist of the following:
When you create a form, you save and install it into a Folder Forms Library. The properties of the forms saved into a particular folder are dependent on the properties of the folder. This includes access permissions. When the user chooses New Form on the Tools menu in the Exchange Client, a list of forms available in the folder is presented.
The Global Forms Library The Global Forms Library houses all the forms you want to make available to everyone in the enterprise. These forms could include vacation-request forms, corporate memos, or telephone message forms.
The Folder Library Every folder, either public or private, has a forms library associated with it. You can save forms into one of your private folders, but they will only be shared with anyone to whom you have given access to your folders.
By putting forms into a public folder, you allow robust sharing based on the permissions of the folder, which are generally easy to change if the need arises. When new users are added to the Exchange system, their group memberships can determine to which public folders they have access.
Say you had a group called Directors, for example, that contained people at or above the level of director in your organization. You could create a folder that contained a form these users could fill out that would make it easy to enter product data sheets, and store them in a public folder so that all people at that level or above could view and modify them. The folder you set up has the permission properties set to enable only members of the NT group Directors to view and modify.
The Personal Forms Library This library is not shared with any other user. It contains the forms the person uses most often. If you have functions you perform every day and create a form to automate those tasks, you would place the form in your personal library. In addition, you can use these forms when working offline as long as your default information store resides on your local disk.
Because forms reside in folders, it is pertinent to discuss folder views. Global views apply across all forms and folders, and folder views apply only to the selected form containing the view.
Think of views as the different reports generated off a database. In the old days, you had to write different report specifications to get the data you wanted presented in the order you wanted.
Views enable you to order information and present it to the user the way he or she would like to see it. When you establish a form, you create structured fields within it that lend themselves very nicely to the four kinds of views:
Views are created outside the form in the Exchange Client. Once you install a form into a Folder Form Library, all its fields are published to the library, enabling you to set up views easily later on in the Client.
Just as views are folder properties that apply to form, so are rules. Rules are a powerful feature in Exchange that enable you to control what happens to an item once it is submitted to a folder.
Many e-mail packages have this functionality in some form. In most cases, however, you must be logged in to your mail application for the rules to take effect. Also, most e-mail packages lack the ability to do this with bulletin board-type functionality.
With Exchange, an example of applying rules to a form entry would be that any item meeting certain criteria can be moved to a subfolder, e-mailed to someone else as a carbon copy, or even deleted.
This functionality gives you much more control over the organization of your data, and even helps reduce redundant entries. It cuts down on administration because everything is automatic once the rules are established. For more information on rules, see the section titled "Setting Folder Rules" later in this chapter.
By establishing folder permissions, you control who has access to any of the forms contained in that folder's Library. You also control what the user can do in the folder. You can set options to allow read, write, and edit access. In addition, you can select pre-defined roles that enable the administrator to quickly establish a set of permissions for the user.
You can also delegate any user as an owner of a certain folder. This enables that user to give other users access permissions. This is analogous to Windows NT Server permissions that allow multiple users to be administrators for a certain domain. Giving someone else ownership permissions allows for multiple administrators and the delegation of responsibilities.
An easy way to think of items is to think of database tables. In a database, tables consist of records, which consist of fields that have values. Exchange forms work the same way. Folders contain items that contain fields that have values. It's very straightforward. An item is like a record in a database.
If you are familiar with Visual Basic at all, this section will be refresher material. If you've never used Visual Basic, this section will provide very important information that will aid you in understanding the form design process.
Visual Basic is mentioned because Exchange forms are Visual Basic Version 4 executable programs. They do not need to be run independently of Exchange, as the Exchange Client takes care of this process. Using forms is completely transparent to the user.
The Forms Designer serves as a front end to Visual Basic, so non-programmers can create robust applications using a simple tool without the advanced knowledge needed to use Visual Basic.
Using Visual Basic comes with some consequences. Non-Windows clients are not able to use Exchange forms because there is machine-executed code involved, and non-Windows platforms cannot run this code.
On the flip side, however, companies that have in-house Visual Basic expertise can build robust, enterprise-caliber applications that take full advantage of object linking and embedding, as well as SQL Server access. You could have an Exchange application, for example, that relies on the Global Address Book for addressing information, but at the same time writes fields to an SQL Server database somewhere on the network.
An Exchange form is made up of the following components:
Setting a form's properties is the most daunting task facing the Form Designer. The application takes the desired effect through these properties. Properties sheets are the means by which the Forms Designer accomplishes its magic without the need for writing code. Depending on the properties of each object, certain actions bring about certain results.
As indicated by the title of the section, setting up the properties of each component is made easier because the properties are organized by Form, Window, and Field. The properties you can set for an item varies with the item:
Upon the creation of a form, a form project file with an .EFP extension is created. It is very similar to a Visual Basic project file.
When you choose the Install command from the Forms Designer, several things happen that are transparent to you. The form files are taken by the installation routine and Visual Basic project files are created. This enables you to use these .MAK files and use them within Visual Basic 4 to extend your applications at a later time.
Once that happens, the form is compiled into an .EXE file, just as when you use the Make .EXE command from the File menu in Visual Basic. In addition, a configuration file with a .CFG extension is created. This is used by the forms library for installation.
After that step is completed, the form gets installed into the forms library of your choice. You will now be able to access your form from the folder you chose.
You now have all the information you'll need to create an application. The information in this section gives you a general overview of the steps to follow to create an application from beginning to end.
When designing a form, you should follow these simple steps:
You are now ready to create applications using the Microsoft Exchange Forms Designer. The next section goes into detail with a step-by-step tutorial. A sample form is created from scratch, showing you how the outline above helps you design custom applications.
You are now ready to design a form from scratch. Try to follow the outline for designing forms as closely as possible.
Many organizations that have World Wide Web sites on the Internet choose to advertise their sites on other servers. These companies must design forms that enable the technical staff to communicate effectively and quickly with the media department that purchases the space on others' web sites.
The form you're going to design facilitates that need. It makes it very easy to let the technical staff know exactly what's needed by the company housing the hypertext links.
The purpose of the form has been stated rather clearly, so move on to defining the fields you'll use on the form.
TIP: It is a good idea to collaborate with all the departments involved with the fields on the form at design time. They can provide a lot of key insights that will make the form much more useful to all the parties involved. For this form, the media, creative, and account departments need to be involved in the form-layout process.
The fields are shown in Table 33.1.
Name of Field | Purpose |
To | Addressee on the technical staff |
Date | Date the note was sent |
Subject | User-definable subject field |
Company | Company from whom you leased space |
URL | Web site URL the button will reside on |
OurURL | URL the button will point to |
Size | Pixel size required by the company |
StartDateEffective | Button start date |
EndDateEffective | Button end date |
Transport | Type of media required, if any |
Address | E-mail address of company |
Contact | Name of contact person |
ContactPhone | Phone number of contact |
This table is exactly what you should draw out before ever loading the Forms Designer. The field names are used later in the field properties definitions. The purposes of each field will also help you and your colleagues better design the form and add fields later.
You now have to determine where your form will reside. For this application, just store the form in a Folder Forms Library. There's a person in the media department who coordinates all the web site space lease agreements and starts the routing of the form. She will use this form from a private folder. When troubleshooting the form, it is much safer to keep the form in a private folder until it is ready.
You don't need to do anything special to use your Folder Forms Library. The form-installation procedure does this for you. If you were using a public folder, you would have to obtain permission from the Exchange administrator to create the public folder and write items into it.
You are now ready to launch the Forms Designer and start drawing out your form. This section goes through the procedure step by step. Figures are used to walk you through each step. Each figure is the result of the step before it. For example, step one will yield the figure immediately following it.
TIP: You can use any of the sample forms provided to familiarize yourself with the different kinds of forms.
FIG. 33.1 You can use the Wizard, open a template, or use an existing application.
FIG. 33.2 The Wizard gives you the choice of using the form to send to another user or to post to a public folder.
FIG. 33.3 You can either use the form to send information, or let the user enter a response to an existing item.
FIG. 33.4 The name and description given to the form determines how the user sees it in the Viewer.
FIG. 33.5 The Finish screen of the Wizard shows you the next steps you'll need to take when designing your form.
FIG. 33.6 Clicking Finish lays out the default fields onto the form and brings up the screen where you can add fields.
NOTE: You could use an Entry Field for this field, but for this example, it is good to try to experiment with the different field types.
FIG. 33.7 You now have four elements on your form: a frame, two entry fields, and a listbox.
NOTE: The items that appear in the listbox will be input later when setting properties for each field.
TIP: It is a good idea to save your form at this point. Select Save from the File menu, give your form the name WEBFORM, and click OK.
NOTE: You'll notice that the listbox containing the company field has been extended. It is very easy to control the length of the box by dragging on the border.
FIG. 33.8 The form is now completed.
Now that the form has all the objects laid out on the screen, the next step is to make them actually perform functions, which is done through the use of properties.
Setting Form Field Properties First set the properties for all the fields on the form. The reason the fields come first is that each field is given a name in the properties field that makes it easier to reference when setting Window properties.
TIP: You can select the field and press F4 instead of double-clicking the object. For fields in tight areas of the screen, this is the preferred method because double-clicking these areas sometimes yields strange results, such as the selection of text.
FIG. 33.9 The General Properties are complete for the Company field.
FIG. 33.10 Highlight any entry and click the Set selection to initial value button to make it the default.
FIG. 33.11 The General tab contains the same information regardless of field type.
You've now completed all the form properties required for this form. You'll probably need to set other properties for other forms, and this example provides you with a good starting point.
Setting Window Properties Forms contain fields and windows. Just as fields have properties, so do windows. Follow these steps to set window properties:
FIG. 33.12 The layout of the window is determined by its properties.
The Window Properties have now been set. This is the second tier of properties you need to set for your form. This chapter now moves on to the third and final set of properties that control how the form itself interacts with the user.
FIG. 33.13 Your Format properties are now complete.
FIG. 33.14 The Menus tab gives you the opportunity to change the menus at the top of the screen.
Setting Form Properties You'll now set the form properties. Follow the step-by-step model, using the various figures to keep you on track:
TIP: You can also press Ctrl+F to get to the Form Properties.
FIG. 33.15 Use the General tab to control how the user sees your form.
NOTE: Although the icon and help settings are set here, they are not modified for this application. Please refer to the Microsoft documentation and online help for more information on setting up help for your applications.
All the needed properties are now complete for this form. From here, you'll continue on with the list of steps that need to be followed when creating custom forms with Exchange.
When you install a form, Visual Basic code is generated, and an executable file is generated that Exchange runs when someone calls the form. This code can be called up within Visual Basic later on to add more functionality to the form or application. Follow these steps to install the form:
FIG. 33.16 The Events tab is used to control how the form will react when different events are triggered.
FIG. 33.17 The installation procedure does all the work for you. All you have to do is select where you want the form to reside.
You now need to run through the form to make sure everything works properly. This is really not a step-by-step process. Look for the following items:
To use the form, select New Web site Button Form from the Compose menu in the Viewer.
The Column Name property of each field becomes very important when designing views. You can group, sort, and display information by any one of the column names you defined in the design phase.
The Web site Button form is used to send structured data to another user (see Figure 33.18). You've created a folder for the form, and will now design a view. When the user receives a Button Form in his or her Inbox, dragging into this folder will make the item conform to the default view. Follow these steps to design the views:
FIG. 33.18 Designing views is made easy by the Folder Designer.
FIG. 33.19 The Views tab displays the views available and provides a textual description of each.
All the entries in this folder will now be displayed according to the view you created (see Figure 33.21).
FIG. 33.21 Views determine how the items appear in the folder.
You have now completed all the necessary steps for the web site button form. The next steps are provided for demonstration only because this form is a send form, which is intended to simplify sending structured information to a particular user.
You can, however, make the public folder the recipient of the message. This would enable a centralized repository of all the Web site Button buys.
The Web site Button Form will only be used by a few people, so putting it into a public folder isn't really appropriate; however, for the purposes of illustration, you will go through the steps of copying a form into a public folder.
In some organizations, administration of these folders is centralized, and information policy prevents the administrator from giving users permission to manipulate public folders. The user must pass the folder on to the administrator, and have the administrator perform the following steps.
In some cases, however, a new public folder will be created, and permission will be granted to the user to manipulate the folder and its forms library. The following tutorial assumes you have all the proper permissions:
Now that the form has been moved to a public folder, you must now follow these steps to set the properties for that folder:
FIG. 33.22 The Administration tab should now be completed.
To set the folder permissions, follow these steps:
Role | Permission | ||||
Owner | All | ||||
Editor | Create Items | Read Items | Edit All Items | Delete All Items | |
Author | Create Items | Read Items | Edit Own Items | Delete Own Items | |
Publishing Editor | Create Items | Read Items | Edit All Items | Delete All items | Create Subfolders |
Publishing Author | Create Items | Read Items | Edit Own Items | Delete Own Items | Create Subfolders |
Reviewer | Create Items | Read Items | |||
Contributor | Create Items | ||||
None | No Permissions Granted | ||||
Custom | Enables you to set permissions that do not match a predefined role |
FIG. 33.23 The Permissions tab enables you to control who has access to your form and what operations each user can perform within the folder.
You can use rules for any folder, including the Inbox. Rules process incoming items by running them through a series of criteria. The rule itself is the action to take upon the meeting of those specified criteria.
Some organizations have people with certain contacts or specialties. You can set up rules to copy messages to certain users with those specialties.
You're going to set a rule that will forward all Web site Button requests for ESPNet to Ruben Perez because he processes all the ESPNet dealings. The user you choose obviously depends upon your own site. Follow these steps to set folder rules:
FIG. 33.24 In the Advanced properties, you select fields on the form as search criteria.
FIG. 33.25 You've now set up a complete rule. All ESPNet requests will be forwarded to the user you chose.
FIG. 33.26 The newly created rule is now added to the rule list in the Folder Assistant.
You've now completed all the steps in the folder design process. Your form now makes it a lot easier to expedite Web site Button requests. The purpose of using this type of application is to show you how you automate any kind of process.
The Exchange CD-ROM ships with many examples of common office forms. Using what you have learned here, you can go about modifying those for your own purposes.
Now that you've created a new form and placed it in a public folder, accessing it and using it are a snap.
Address to a person by completing the following steps:
Address to the Web site button Public Folder by completing the following steps:
FIG. 33.27 The Web site Buttons folder is now in your Personal Address Book.
Since forms are Visual Basic applications, you can actually use Visual Basic to extend the functionality of forms beyond what the Forms Designer offers. The Forms Designer simply gives you a "No Programming" environment where you design very powerful applications without typing one line of code.
This section covers only a brief overview of what you need, what goes into using Visual Basic to modify applications, and why you would want to use Visual Basic to modify applications. You can refer to the Microsoft documentation and Visual Basic documentation for specifics on using Visual Basic for MAPI and OLE applications.
Anyone who wants to use VB to extend an application created with the Forms Designer should be very experienced with Visual Basic, as well as MAPI and OLE. Forms are 16-bit applications; therefore, you can only use the Visual Basic for Exchange that is installed when installing the Exchange Client and Forms Designer or 16-Bit Visual Basic 4.0.
You might be asking yourself, why would I want to use VB to extend forms? Here are just a few examples of how VB can improve your forms:
When you install a form using the Forms Designer, several files get created in a directory called <FORMNAME>.VB. These files are used when extending forms with Visual Basic (see Figure 33.28).
When using VB, only the <WINDOW NAME>.FRM files and the <FORM FILE>.CFG files are modified. Once you finish using Visual Basic to modify your form, you need to register all the new fields and properties in your form with Exchange. You will need to modify the .CFG file directly in Notepad or Wordpad to add all the objects and properties so they are recognized by Exchange.
FIG. 33.28 The WEBFORM.VB directory contains all the files used by Visual Basic.
NOTE: Before you can install the Forms Designer, the Exchange Microsoft client must be installed. In order to get the sample applications along with your installation, you can choose either Typical or Custom/Complete. Typical installs with most files. Custom/Complete enables you to choose whether to install the sample applications or not. When you choose either of these installations, you must reboot because system files will be changed during the installation system.
NOTE: When using forms with an NTFS partition, you are not able to use the custom forms in Microsoft Exchange if you are running Windows NT 3.51 Server or a Workstation computer. To change this, you must alter a specific registry key that reads as follows:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation = 0x1
To use custom forms, you must delete this key or set its value to 0. In a Windows NT 4.0 Workstation and Server environment, this particular registry key value is set to 0 by default.
When you are planning to design forms, decide on a home directory for your work to give you a sense of structure from the beginning. If you don't establish structure from the beginning, you won't know where the Forms Generator is keeping your files, which may lead to duplicate files in other directories all over your hard drive. When you pick a directory (such as c:\exchange\efdforms), the Electronic Forms Designer (EFD) starts to store all your information in that folder. This is especially helpful when you extend your forms with Visual Basic's 16-bit version. The 32-bit version of Visual Basic 4.0 is not currently compatible with EFD. When you install the form, you are finished. The EFD creates a folder with the same name as your efp file and a Visual Basic extension. Inside this folder is the Visual Basic Project file (VFP).
In the following pages you create an application using both Form Designer and Visual Basic's 16-bit version. This demonstrates a first look at extending your forms application with Visual Basic. Start the forms designer by clicking the Start button, Programs, and then the Microsoft Exchange Folder. Click the option for the Forms Designer to start it.
Creating the Personnel Information application may not cause your company's stock to rise, but it will teach you some useful tricks you can bring into the world of development using Microsoft Exchange's Development tools. In this section you take a look at using Send Forms in a folder, calling a hidden response form, using a rich edit field with the help of Visual Basic to enable file attachments in your form, and creating a custom response.
The Personnel Profile Information folder is a public folder that houses the forms you will create in this section. It also contains different views you will create and the result of the information collected by your Personnel Information Application. A sample view of items submitted to the Personnel Profile Information folder is shown in Figure 33.29.
FIG. 33.29 Sample View of the Personnel Profile Information folder.
The Personnel Profile Information Request form's compose window, as shown in Figure 33.30, is used by a Manager to send a Personnel Information Request item to the user's Inbox. Its Read window is used by the members of the organization to read the request and open the Personnel Profile Information Response form.
FIG. 33.30 Pre-addressing the Response form
The Personnel Profile Information Response form's Compose window, as shown in Figure 33.31, is pre-addressed to the Personnel Profile Information folder. When the user clicks the Send button, the item is automatically routed to that folder. The Read Window displays the information in the Personnel Profile Information Response item that the user submits to the Personnel Profile Information folder.
FIG. 33.31 Pre-addressing the Personnel Profile Information Response form.
You must log in as yourself to begin. If you don't, your profile will not reflect the location of your mailbox. Next, you need to create a public folder for storing the Personnel Information items. Where you create this folder is really up to you, but to make this application available to everyone, you should use the All Public Folders folder as your starting point. To create the Personnel Information Folder, follow these steps:
While you work on the folder, restrict access to the folder so that you can design it without being interrupted. To restrict access, follow these steps:
FIG. 33.32 Using the Administration tab to select the Owners Only option.
For this application, you will create a pre-addressed Response form. It's a lot like a pre- addressed envelope that you receive in the mail. In this case, the Response Information form is pre-addressed so that posting to the folder is automatic. You now learn how to pre-address a folder. Before you can pre-address a form to a folder, the folder's address must be available to the address book.
To add a folder address to your Personal Address Book, do the following:
The Forms Designer provides several generic pre-designed templates for you to begin using immediately.
To get started with the Personnel Profile Information Request form, use the SNDR2WND.EFP template. This is a two-window Send form similar to the one you would use to send messages. It has To, From, and Subject fields, such as a standard mail message. Although you can use the Form Template Wizard to choose a template, it is faster to choose a template directly from the list of the File Directory dialog box.
Before you open any files, create an application directory to house your files for this application.
To open and use the SNDR2WND.EFP template, follow these steps:
Figure 33.33 displays how the form looks when it is selected from the Compose menu. To run the Personnel Profile Information Request Form, choose new Personnel Profile Information Request from the Compose menu.
FIG. 33.33 Displays how the form will look when it is selected from the Compose menu.
The Personnel Profile Information Request window, shown in Figure 33.34, is great for anyone who needs profile/personal information from a user or group of users in the company. You can use Figure 33.34 as a model to help customize this form.
FIG. 33.34 Shows you how the Personnel Profile Information Request form looks in its final state.
When you start designing forms, you must always consider who will be using your form and how. On many occasions the Compose window is different from the Read window. You use the Personnel Profile Information form to request information in a Compose window. The end users see a form that looks similar to the one you sent, but they see only who sent the form to them and the date and time that it was sent. The Request form in the Read window should include brief instructions to inform the recipient how to fill out the form.
At run-time, the Read window of the form appears when the user double-clicks a Personnel Profile Information Request item in the user's Inbox. The Read window displays the Personnel Profile Information Request form and your instructions. Figure 33.35 shows you an example of what the user sees in his Inbox.
As a courtesy to the user, you can set the initial value to display in the Subject field of the Read window.
FIG. 33.35 An example of what the user will see in his Inbox when the Personnel Profile Information Request item has been delivered to him.
To set the initial value of the Subject field, follow these steps:
The title bar of the Form window can also be defined in the Window Properties dialog box. As a general rule, it should begin with New, followed by the name of the form (see Figure 33.36).
FIG. 33.36 Defining the title bar of the form.
To set the window caption, follow these steps:
In general practice, I usually create the information for the Compose Window first, and then I copy that to the Read window. Refer to Figure 33.30 for an example of text to use as user and Administrator instructions.
To copy the user instructions, use the following steps:
NOTE: You add the Open Personnel Profile Information Form command button later in Visual Basic.
After opening the Read window, remove the unnecessary fields from the form. You can do this by selecting them and pressing the Delete key on your keyboard.
To remove the To and Cc fields from the Read window, select each one and press the Delete key on your keyboard. Now you can paste and re-position the user label field.
The Read window re-sizes just as any other window--just be sure you leave enough room for the button made later in Visual Basic.
The window caption is the only property to set in the Window Properties dialog box. To set the window caption, follow these steps:
In the General tab of the Form Properties dialog box, change the display name and the item type for the form. To set the forms general properties, follow these steps:
Property | Setting |
Form Display Name | Personnel Profile Information Request |
Version | 1.00 |
Number | PINFO7.1 |
Item Type | IPM.PersonnelProfileInformationRequest |
Description | Send requests for Personnel and profile information in your company |
The most common event is the Create New Item event. Select View from the menu and click Forms properties. Then click the Events tab--you should see something similar to Figure 33.37.
FIG. 33.37 Viewing the Create New Item event.
Every time the New Personnel Profile Information Request is chosen from the menu, the Create New Item event executes. This event creates a new instance of The Personnel Profile Information Request form. In other words, the Compose version of the Request form appears when the New Personnel Profile Information Request is chosen from the Compose menu. Figure 33.38 illustrates a new instance of the Personnel Profile Information item.
FIG. 33.38 Viewing the new instance of the Personnel Profile Information Request item from the Compose menu.
The first time people start working with custom responses, they ask themselves, "Why do I need two forms?" The Read version of the request form is a request from you to the end user for information you need from him/her. On this form is a button that enables the end user to open another form so they can enter the information you requested and return the form to the Personnel Profile folder for review.
You still must set up a Custom Response event to launch the Personnel Profile Information form. This creates a new Compose menu item each time it executes. To do this use the Forms Properties events tab as shown in Figure 33.39:
FIG. 33.39 Viewing a Custom Response already created in the Forms Properties window.
The Forms Designer gives you a start in the design of forms, but the limited toolbox doesn't offer much depth. Most of the shortcomings of the Forms Designer can be easily overcome with Visual Basic or Visual C++. Before you can extend the functionality with Visual Basic, you must first install the form into the Personnel Profile Information folder. When you install this form, the Visual Basic code is created for it automatically; this means a Visual Basic Project file and a .CFG file are created. The .CFG file will be used later by Inbox to install the Visual Basic Executable so that the form with the new Visual Basic Code can run from the Inbox.
To install the Request Form, follow these steps:
FIG. 33.40 Installing the Request form in the Personnel Profile Information folder.
NOTE: Always save the files with a name that relates to the contents of the file and is easy to remember.
To get started with the Personnel Profile Information form, you can use the SNDR2WND.EFP template. This is a two-window send form used for creating response items. This file however is read-only, so you must rename it before you can use it. The name I will be using throughout this chapter is ppinfo.
To open and use the SNDR2WND.EFP template, follow these steps:
To remove the cc and Subject fields, select them and press Delete.
From the toolbox, select the Tab control and click your form. Resize the Tab control to fill the contents panel. To fill the reference name fields, name the tabs by double clicking each one. The names I have chosen are as follows:
Personnel Profile
Job History
Training/Certification
Using the Designer toolbox, place the following fields on each respective tab, as illustrated in Figures 33.41-33.44 (see Tables 33.4-33.7).
FIG. 33.41 The first tab and the fields it contains.
Type of Field | Caption | Reference Name | Column Name |
Entry | Address: | Address | Address |
Entry | City: | City | City |
Entry | Home Phone: | HomePhone | HomePhone |
Entry | Alt Phone: | AltPhone | AltPhone |
Entry | Pager: | Pager | Pager |
Entry | In case of emergency,contact: | Frame1 | Frame1 |
Entry | Name: | Emergency Contact Name | Emergency ContactName |
Entry | Home Phone: HomePhone | Emergency | Emergency HomePhone |
Entry | Alt Phone: | Emergency AltPhone | Emergency AltPhone |
ComboBox | Teams: | Teams | Teams |
Entry | Manager's Name: | Manager's Name | Manager's Name |
In addition to or instead of a user typing in a Personal Statement, she can attach relevant files.
To attach a file to the Personnel Profile Information form, select Insert from the Menu and click file. The file automatically finds the RichEntry field with the MAPI_Body_Custom type.
FIG. 33.42 The second tab and the fields it contains.
Type of Field | Caption | Reference Name | Column Name |
Entry | Consultant's Name: | Consultants Name | Consultants Name |
ComboBox | Title: | Title | Title Listing |
Personnel | Personnel | Personnel Entry | |
Statement | Statement | Statement | |
RichEntry | Attachments: | Attachments | Attachments |
FIG. 33.43 The third tab and the fields it contains.
Type of Field | Caption | Reference Name | Column Name |
RichEntry | Job History: | Job History | Job History |
FIG. 33.44 The fourth tab and the fields it contains.
Type of Field | Caption | Reference Name | Column Name |
RichEntry | Training: | Training | Training |
RichEntry | Certifications: | Certifications | Certifications |
The initial value properties define the values that appear in a field at run-time. In this case, define the initial values for the Team ComboBox on the first tab. You can also choose a default value to appear at run-time.
To set the initial value for the ComboBox field, follow these steps:
FIG. 33.45 Setting the initial values for the ComboBox field
As stated earlier, a pre-addressed form is like an envelope with a return address. You pre- address this form by setting the initial value of the To field to the Personnel Profile Information folder.
To predate the form, follow these steps:
Now set the window caption and the field tab order. The window caption appears in the title bar of the window. The field tab order is a property that controls the order in which the windows fields gain focus as the user presses the Tab key.
To set the Window Caption, complete the following steps:
To set the tab order, complete the following steps:
You can save design time by copying everything you have done so far in the Compose Window to the Read Window.
To copy fields in the Compose window to the Read window, follow these steps:
In the Window Properties dialog box, repeat the same procedures as were performed in the Compose Window to set the tab order and window caption name properties.
NOTE: Leave the pre-assigned MAPI fields set, and then order your fields in the same order of the Compose Window.
Now you can name the form and give it a unique item type that matches the item type you specified for the Custom Response 1 event in the Request form.
To set the form display name, follow these steps:
To set the version, number and item type, follow these steps:
To set the form description, follow these steps:
As stated earlier, when you choose install from the File menu in Forms Designer, the Forms Designer tells you it will save the form before it installs it (unless it is already saved). After a moment, the Folder Library appears. This enables you to save your form in a particular folder (such as the Personnel Profile Information folder).
NOTE: Always save the files with a name that is logical, descriptive, and easy to remember.
The By Team view indicates which practice(s) the consultant is a member of.
The By Team view consists of the following fields: Teams, Consultant's Name, Title Listing, Home Phone, and Manager's Name. The view groups these fields by team and sorts items in ascending order by Consultant's Name.
To create the By Team View, follow these steps:
Teams 36
Consultant's Name 36
In the Permissions tab, you define different levels of security for your folder.
To set permissions, select the Permissions tab in the Personnel Profile Information Properties dialog box. Then set permissions according to the following table.
Sometimes you might want to restrict users to only the items you want them to interact with. Figure 33.46 shows how to limit the forms a folder displays.
FIG. 33.46 Limiting the forms a folder displays.
To restrict the types of items, follow these steps:
The time has come to test the application. Once you are satisfied that it's working correctly, you can enhance its usability by giving it some extended capabilities in Visual Basic.
To test the Request form in the Personnel Profile Information folder, follow these steps:
To test the Response form, follow these steps:
To modify a form generated using the Forms Designer, you must use the Visual Basic that comes with the Microsoft Exchange Client or the 16-bit compiler of Visual Basic version 4.0 or later.
To add a command button to the Compose Window, follow these steps:
To add the Command button to the form, follow these steps:
When the Forms Designer generates Visual Basic code for the form, it seems to scramble the components in the Compose and Read windows. Fortunately, the generated code contains several procedures that arrange these components in the window at run-time. To clean up the window, the first thing you should do is enlarge the window. Then hide the scroll bars by dragging them to the edges of the window. Next hide the status bar by setting the Align property for the Status Bar Control to 0 -None. Now drag the status bar out of your work area as you did the scroll bars.
The Form window canvas consists of a large picture control (Canvas_Ctrl) inside a much smaller canvas control (CanvasParent). To resize the canvas, follow these steps:
FIG. 33.47 Increasing the size of the Canvas Ctrl.
FIG. 33.48 Visual representation of how the CanvasParent control should look after resizing.
To add code to the Command button, double-click the Command button, and add the code as shown to the button-click procedure.
***begin code listingPrivate Sub Command1_Click() Call menComposeCustomResponse_Click(0) End Sub
This code calls the Click procedure for the Custom Response command and passes it an Index value of 0. This is the same value that the Custom Response menu command passes to the procedure. In the number system, when you count from 0 to 9, you have actually counted 10 numbers. The zero you passed in the menComposeCustomResponse Sub procedure represents the Custom Response 1 event you set up in the Forms Designer earlier in this chapter. If we were to pass a 1 to this procedure, this would represent the Custom Response 2 event.
To copy the Command button and code contents to the READ.FRM, complete the following steps:
When you create a new executable (.EXE) file, you incorporate the changes that were made in Visual Basic. When you see the odd name of the executable that is generated, your first reaction will be to change it to something more readable. My advice is to leave it as is. When the Forms Designer creates an .EXE file for the form, it also creates a .CFG file. If you were to change the name of the executable created by Visual Basic, you would have to update all the references made to it in the .CFG file. Frankly, it is more trouble than it is worth at this point.
When changes are made to a form in Visual Basic, you must use the Forms Manager in the Microsoft Exchange Client to install the form. Remember, only the person who created the folder can make these types of changes.
To reinstall the Personnel Information Request form, follow these steps:
To check and see if you have the right form, select the Personnel Profile Information folder and select the request form from the menu.
This section introduces you to the art of making custom Outlook applications without prior programming experience. If you're already familiar with Windows and Visual Basic or Visual Basic Script, you should have an easy time using the Outlook Forms Designer.
The Outlook Forms Designer enables you to lay out all the different fields on your form, link them to Outlook objects, and designate actions on events. Without any previous programming experience, you can create applications that will make your organization more productive. Many example applications are provided for you when you load Outlook from the Microsoft Office 97 Resource CD. You can also use the pre-designed forms that are built into Outlook and modify them for your use.
The Outlook Forms Designer enables the creation of two types of forms:
Before developing a new form, you need to decide which type of message is being created. In the Outlook environment there are three basic categories of forms:
The Message form can be used as a starting point for building forms that enable users to send information to other users, distribution lists, or other folders. Good examples of this concept are a Vacation Request form and a While You Were Away form.
The Post form is good for centralizing e-mail responses and submitting items directly to the active folder. Examples of this are Product Idea Applications and Technical User-Groups.
Office Document forms are essentially office documents wrapped in either a Message or Post form. You can create Office Document forms to send documents to other users and to post documents in a folder. Examples of the Office Document forms are Expense Reports and Purchase Requests. Both of these sample applications are included with Outlook.
Modifying a form that already exists allows you the luxury of not having to start from scratch. You can now build upon the functionality provided by a built-in form. To modify a built-in form, follow these steps:
You are now in Design mode for that particular form. The tabs you see are called pages. To begin designing, simply click the tab of your choice.
There are two methods you can use to place fields on your form. First, you can select the category of the fields you want, select a field, and then drag it to the page. If you don't find a field that fulfills your requirements, you can create your own and then drag the newly formed field to your page. After you position the field on the page, you can resize it.
The second method you can use to place a field on a form involves the use of the Control toolbox. This option is located on the Form menu of the form you currently have in Design mode.
The Calendar, Contacts, Journal, and Tasks are built-in Forms you can modify. These built-in Forms provide a basis from which you can create your design strategy.
The following example shows you how easy it is to design a simple form. The first step is to create a folder to house the application:
After you create the folder in which to store the application, you can add some fields to the Page Control by completing the following steps:
When you publish a form, you make it available to everyone that has permission to the Tech Solutions folder. When a user selects the Tech Solutions Folder, he or she can then invoke a new instance of the form by selecting it from the Compose menu.
Follow these steps to publish the form:
Whereas the first part of this chapter gives a quick overview about how to customize forms in Outlook, the remainder of the chapter explores accessing Exchange objects through a web browser by using IIS, VBScript, and Active Server Pages.
In the Exchange Forms Designer, I had many more files to keep track of if I wanted to successfully move the files necessary to run my application to a standalone computer.
In Outlook, however, you can export your applications to a .pst or .fdm file, which in turn can be imported back into Outlook, running on a standalone workstation.
You set up views in Outlook the same way as in the Exchange Development Platform. The only difference is that instead of selecting the folder, choose Properties and select the View tab to create a view. You now select View from the Outlook menu bar and select Define Views.
If your organization is using Exchange and Outlook Clients, you should select the Automatically generate Microsoft Exchange views check box. This option generates Microsoft Exchange view for the folder so that views created in Outlook can be seen by Microsoft Exchange Clients. The rest is pretty much the same.