Special Edition Microsoft Exchange Server 5.5

Previous chapterNext chapterContents


- 33 -
Developing Exchange Forms



This chapter introduces you to the world of making custom applications for Exchange and Outlook without prior programming experience. If you're already familiar with Windows and Visual Basic, you'll have a very easy time using the Forms Designer interface.

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.

Installation of the Exchange Forms Designer

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.
1. From the Client CD-ROM, under either the Eng directory or the Frn directory, double-click the EfdSetup directory and choose Setup.

2. Choosing Complete/Custom from the menu, you see two options--Exchange Forms Designer and Sample Applications. This option gives you the option to install the Sample Applications. You may also choose Typical setup, which automatically installs the Forms Designer and the Sample Applications.

3. From the Complete/Custom window, choose Change Options.

4. In the Options box, select Forms Designer and Sample Applications and then choose OK.

5. Choose Continue.

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.

Using Forms in Your Organization

Exchange's structure provides for many different uses of the containers in the hierarchy. You can design applications that leverage this flexibility.

Discussing Applications

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.

Referencing Repositories

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.

Explaining the Forms Environment

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:

Forms Libraries

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.

Views

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.

Rules

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.

Permissions

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.

Items

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.

Explaining the Form's Components

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 Properties of Form 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:

Installing Forms

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.

Planning Your Exchange Form

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.

Creating the Web Site Button Form

You are now ready to design a form from scratch. Try to follow the outline for designing forms as closely as possible.

Defining the Purpose

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.

Defining the Fields

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.

Table 33.1  Web Site Button Form Field Names and Descriptions

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.

Creating a Folder for Your Application

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.

Creating the Form

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.

1. Double-click the Forms Designer icon. The Microsoft Exchange Forms Designer dialog box appears (see Figure 33.1).


TIP: You can use any of the sample forms provided to familiarize yourself with the different kinds of forms.
2. Choose the Form Template Wizard and click Next (see Figure 33.2).

3. Select To Another User (send) and click Next.

4. Select To Send info and click Next (see Figure 33.3).

5. Choose One Window and click Next (see Figure 33.4).

6. Type Website Button Form in the Name field, and This form is used to send detailed information to the technical staff to expedite Web site media buys in the Description field (see Figure 33.5).

7. Click Finish (see Figure 33.6).

8. Our form does not require a "cc" field. Click the middle of the field and press the DEL key.

9. We are now going to add the necessary fields to the form. First, select the Frame tool and click the right side of the form. A frame will be created that will house the StartDateEffective and EndDateEffective fields.

10. Now you'll create the text entry boxes for the fields that will go inside the frame. The frame is just an easy way to group fields. To create a text entry field, click the Entry Field tool and drop the fields inside the frame. Then resize the fields as necessary by dragging on the border when the arrows appear.

There are a few ways to create multiple fields. You can either create each one separately, or you can create one, size it, and copy and paste it.

You can replace the word Caption with the text describing the field. Just click in the box with the text of the caption and type over it.

11. You now create a listbox containing the names of the companies you usually deal with when you buy space. You can always add new companies easily.

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.
Select the Listbox tool from the toolbar. Drop it onto the left side of the form and size by using the same technique as before. In addition, type Company into the caption (see Figure 33.7).

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.
12. Next add three more entry fields that will sit between the frame on the right and the listbox on the left. They will contain the URL, OurURL, and Size fields.


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.
13. Next you create the frame for the Transport field. This will consist of creating a frame with three radio buttons. The frame caption should read "Transport," and the three radio buttons should have the captions "America Online," "Compuserve," and "Internet," respectively.

As a reminder, click within a caption to change the text and drag the edges of the box to resize. To move boxes around, click somewhere inside the box when the cursor is an arrow and drag the item around the form. If you are familiar with Windows applications, this should be familiar to you.


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.
14. You only need to create three more fields: entry fields that will hold the Address, Contact, and ContactPhone fields. They are shown in Figure 33.8.

FIG. 33.8 The form is now completed.

Setting the Properties of All Objects

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.

1. Double-click the Company field; the properties screen will appear as shown below. There are tabs of information: General, Format, and Initial Value.


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.
2. On the General tab, enter Company into the Reference Name field. The reference name is simply the variable name assigned to the field. You will use this when determining things such as tab order.

3. Check the Required check box (see Figure 33.9). This field is required because without a company name, the rest of the fields cannot be complete. The purpose you established earlier will aid you in determining whether a field is required or not.

4. Click the Format tab. This tab controls the font, alignment, appearance, and style of the field value and the caption. The formatting defaults are correct for your purposes for this application.

5. Click the Initial Value tab (see Figure 33.10). This tab differs for each kind of field. Since you are using a listbox, this tab gives you the opportunity to fill in the values in the list and select a default. Fill in the values according to Figure 33.9. These are the names of some popular web sites that sell advertising space.

FIG. 33.9 The General Properties are complete for the Company field.

6. Click the Close button.

7. Move the pointer over the URL field and double-click.

8. On the General tab, type URL as the Reference Name (see Figure 33.11).

9. Check the Required check box.

10. Complete the procedures in steps 7 through 9 for all the fields remaining on the form. The Reference Name will match the Caption in the General tab of all the fields (excluding spaces).

11. Double-click the Internet radio button in the Transport frame.

12. Click the Initial Value tab.

13. Click the selected radio button.

14. Select Close.

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:

1. Select Window Properties from the View menu.

2. Type WebButton into the Window Name field.

3. Type Web Button Form into the Window Caption field.

4. Establish the tab order by selecting fields and clicking the button marked. See Figure 33.12 for an example of the field order.

FIG. 33.12 The layout of the window is determined by its properties.

5. Click the Format tab (see Figure 33.13). This tab contains properties for window behavior. Background color, window icon, and title-bar icons are set using this tab.

6. Click the Formatting toolbar check box in the Window Options section. Since all the necessary fonts are configured for each field, you don't need the Formatting toolbar for this specific application. It has been removed to show you the variations you can make to a form. (You can leave.)

7. Change the Window Sizing Options drop-down box to Resizeable.

8. Click the Menus tab (see Figure 33.14). You can add and modify menu items here. For your form, you do not need to modify this at all. Refer to the online help and Microsoft documentation for more information on modifying menus.

9. Click the Close button.

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:

1. Select Form Properties from the View menu.


TIP: You can also press Ctrl+F to get to the Form Properties.
This brings up the properties that define your form. As you can see, the General tab contains the Form Display Name and Description you entered in the wizard (see Figure 33.15). There are no other mandatory properties you need to set for this application.

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.
2. Click the Events tab (see Figure 33.16). Use this tab to define how the form will react to different events the user generates. This particular form requires no modification of these properties. See the Microsoft documentation and the online help for a full description of these fields.

3. Click the Close button to return to the main editing window.

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.

Installing the Form

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:

1. In the Viewer, create a new private folder called Web site Buttons in your Mailbox container (see Figure 33.17).

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.

2. Choose Install from the File menu. This initiates the process of calling Visual Basic and compiling the form. After the computer finishes all those steps, a prompt appears asking you where to install the form.

3. Click the Folder Forms Library radio button and select Web site Buttons from the list of folders. If the list doesn't appear, click the plus symbol to expand the tree of folders.

4. Click OK.

Testing the Form

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.

Designing the Views

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.

1. From the Tools menu, choose Application Design, then Folder Designer.

2. Click the Views tab (see Figure 33.19).

3. Click the New button.

FIG. 33.19 The Views tab displays the views available and provides a textual description of each.

4. Type by Company in the View name box.

5. Click the Columns button.

6. Highlight each of the entries in the Show the Following list and click the Remove button so the list is empty.

7. Click Company in the Available Columns list and then click the Add button.

8. Click Transport in the Available Columns list and then click the Add button.

9. Highlight Transport in the Show the Following list and then click the Move Down button.

10. Click Address in the Available Columns list and then click the Add button.

11. Highlight Address in the Show the Following list and then click the Move Down button.

12. Click Sent in the Available Columns list and then click the Add button (see Figure 33.20).

13. Highlight Sent in the Show the Following list and then click the Move Down button.

14. Click OK.

15. Click Sort.

16. In the drop-down list, select Sent.

17. Click the Descending radio button.

18. Click OK.

19. Click OK.

20. Double-click the Company entry in the list check box. It is now the default view.

21. Click OK.

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.

Copying or Moving the Form to a Public Folder

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:

1. Select the Web site Button Form folder.

2. Choose Copy from the File menu.

3. In the Copy box, select the public folder into which you would like to copy the Web site Buttons form. In this case, it's the All Public Folders folder.

4. Click OK.

Setting the Folder Properties

Now that the form has been moved to a public folder, you must now follow these steps to set the properties for that folder:

1. Right-click the Web site Button folder and select Properties.

2. Select the Administration tab (see Figure 33.22).

FIG. 33.22 The Administration tab should now be completed.

3. Select Company as the Initial view on folder. This will ensure that all items in that folder conform to the view we defined earlier.

4. Select Move/Copy in the Drag/Drop listbox.

5. Select the All users with permission radio button in the This folder is available to box.

6. Select the Forms tab.

7. Click the Only forms listed above radio button. This ensures that only the Web site button form will be allowed in this folder. This protects against someone putting in some other type of form, such as a Vacation/Absence form in the Web site Button folder.

Setting Folder Permissions

To set the folder permissions, follow these steps:

1. Click the Permissions tab (see Figure 33.23).

2. Click the Default user and change the Role to None. These are the properties for all users. Changing the Role to None means that users have no privileges in the folder. Table 33.2 lists all the roles and their associated permissions.

Table 33.2  Roles and Permissions

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

3. Click the Add button.

4. Select the users you want to have access to your folder and click the Add button.

5. Change the role of each user you've added to Author. This allows them to Create and Read items in the folder. As you can see, each user can only edit and delete their own items.

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.

Setting Folder Rules

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:

1. Right-click the Web site Button folder and select Properties.

2. Select the Administration tab.

3. Push the Folder Assistant button.

4. Click Add Rule.

5. Click the Advanced button.

6. Click the Folder: Web site Buttons radio button in the Show properties of group.

7. Select the Company check box.

8. Select the ESPNet listbox (see Figure 33.24).

FIG. 33.24 In the Advanced properties, you select fields on the form as search criteria.

9. Click OK.

10. Click the Forward check box (see Figure 33.25).

FIG. 33.25 You've now set up a complete rule. All ESPNet requests will be forwarded to the user you chose.

11. Click the To button.

12. Select the proper user from the list and click the To button.

13. Click OK.

14. Click OK (see Figure 33.26).

15. Click OK.

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.

Using Your Form

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:

1. Select the Web site Buttons Folder.

2. From the Compose menu, choose New Web site Button Form. The forms appear on your screen.

3. Fill out all the required fields.

4. Click the To button.

5. Select a recipient and click the To button.

6. Click OK.

7. Click the Send icon.

Address to the Web site button Public Folder by completing the following steps:

1. Select the Web site Buttons Folder.

2. Right-click and select Properties.

3. Click the Administration tab.

4. Click the Personal Address Book button. This copies the name of the folder to your Personal Address Book so you can send an item to the folder.

5. Click OK.

6. From the Compose menu, choose New Web site Button Form. The form appears on your screen.

7. Fill out all the required fields.

8. Click the To button.

9. Select Personal Address Book from the Show Names from listbox (see Figure 33.27).

FIG. 33.27 The Web site Buttons folder is now in your Personal Address Book.

10. Select the Web site Buttons entry.

11. Click the To button.

12. Click OK.

13. Click the Send icon.

Extending Forms with Visual Basic

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.

Potential Uses of Visual Basic with Exchange Forms

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:

Modifying Applications

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).

Creating the Personnel Profile Information Application

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.

Creating the Personnel Profile Information Folder

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:

1. In the set of public folders in the Microsoft Exchange Client, Select All Public Folders.

2. Choose New Folder from the File menu, and in the Folder Name box, type Personnel Profile Information.

3. Choose OK.

Restricting Folder Access

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:

1. Select the Personnel Information folder and then choose Properties.

2. Select the Administration tab and then select the Owners Only option button, as shown in Figure 33.32.

FIG. 33.32 Using the Administration tab to select the Owners Only option.

Don't choose OK yet. You're not finished with the Administration tab (the steps are completed in the following section).

Making the Folder Address Available

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:

1. In the Administration tab, click the Personnel Address Book button to add the folder address to your Personnel Address Book. Although you won't get any confirmation, the address is added to your Personnel Address Book. If you look down at the bottom of the Administration tab, you will see a backslash and the name of your folder in the folder path area.

2. Choose OK to return to the Microsoft Exchange Client.

Creating the Personnel Profile Information Request Form

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.

1. Change directories to the following path: C:\EXCHANGE\EFDFORMS.

2. Create two subfolders. Call the first one PQINFO and the second PPINFO.

To open and use the SNDR2WND.EFP template, follow these steps:

1. From the opening screen of the Forms Designer, select the A Form Template.

If you are already running Forms Designer, choose File, Open from the menu bar.

2. This is a read-only file, so in order to edit it you must save it with another name in the PQINFO subfolder. In the Exchange\Efdforms\Template folder, select the SNDR2WND.EFP file.

3. Click File from the menu and choose Save As.

4. Navigate through the directory structure to C:\EXCHANGE\EFDFORMS\PQINFO.

5. In the filename box type pqinfo.

Designing the Compose Window

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.

Setting the Window Properties for the Compose Window

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.

Designing the Read Window

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.

Setting the Initial Value for the Subject Field

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:

1. Double-click the Subject field to view field properties and then select the Initial value tab.

2. In the Subject box, type We need your Personnel Profile Information.

3. Choose close.

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:

1. Click View from the menu and select Window Properties.

2. In the General tab, change the Window caption to read "New Personnel Profile Information Request."

3. Click the Close button.

Copying User Instructions Label Field to the Compose Window

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:

1. Click the user instructions label field.

2. Select Edit from the menu and choose Copy.

3. Select Window from the menu and choose Read.

4. Once again select Edit from the menu and choose Paste.


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.

Resizing the Read Window

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.

Setting the Window Properties for the Read Window

The window caption is the only property to set in the Window Properties dialog box. To set the window caption, follow these steps:

1. Select View from the menu and click Window Properties.

2. Click the General tab and then change the window caption to read Personnel Profile Information Request. Then choose Close.

Setting the Form Properties for the Read Window

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:

1. Select View from the menu and click Form Properties.

2. In the General tab, change the settings to reflect the settings in Table 33.3.

Table 33.3  Setting Form Properties

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

Selecting Events for the Request Form

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.

Creating a Custom Response

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:

1. Open the Form Properties Events tab.

2. Choose Custom Response 1 in the For This Event field.

3. Select the Create Response radio button.

4. Browse to select the Response form(PQINFO.EFP). Accept the default Response Form Item Type.

FIG. 33.39 Viewing a Custom Response already created in the Forms Properties window.

Saving and Installing the Form

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:

1. Click the File menu and select install. If your file has not been saved before or changes are detected, the Forms Designer displays a message box informing you that changes to your form will be saved before continuing.

2. When the Folder Library appears, click Personnel Profile Information folder, as shown in Figure 33.40

3. Click OK.

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.

Creating the Personnel Profile Information Form

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:

1. Select File from the menu and choose Open.

2. This is a read-only file, so in order to edit it you must save it with another name in the PPINFO subfolder. In the Exchange\Efdforms\Template folder, select the SNDR2WND.EFP file.

3. Click File from the menu and choose Save As.

4. Navigate through the directory structure to C:\EXCHANGE\EFDFORMS\PPINFO.

5. In the filename box type ppinfo.

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

Adding Fields to the Compose Window of the Response Form

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.

Table 33.4  Fields on the first tab

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.

Table 33.5  Fields on the second tab

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.

Table 33.6  Fields on the third tab

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.

Table 33.7  Fields on the fourth tab

Type of Field Caption Reference Name Column Name
RichEntry Training: Training Training
RichEntry Certifications: Certifications Certifications

Setting the Initial Value of the Teams Field

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:

1. Double-click the Teams ComboBox and select the initial value tab.

2. Type the values that appear in Figure 33.45.

3. Select the field you want to be the default value and click the Set selection to initial value button.

FIG. 33.45 Setting the initial values for the ComboBox field

Pre-addressing the Response Form

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:

1. Double-click the To field.

2. In the Initial Value tab, choose To and then choose Personnel Address Book from the Show Names From The: drop-down box.

3. Select the Personnel Profile Information folder. Choose To and then choose OK.

4. Choose Close to return to the Forms Designer.

Setting the Window Properties for the Response Compose Window

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:

1. From the View menu, click Window Properties.

2. In the Window Caption box in the General tab, change the current caption to Personnel Profile Information Response.

To set the tab order, complete the following steps:

1. Select the field in the Available fields box, and then choose the Add arrow button or double-click the field to add the field to the Fields In Tab Order box.

Leave MAPI-To as the first tab in the Fields In Tab Order box. Add the rest of the fields in the order they are listed in the previous table.

2. Choose Close.

Copying Fields in the Compose Window to the Read Window

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:

1. Select the Tab Control by clicking in an empty space anywhere on the Tab Control.

2. Choose Copy from the toolbar.

3. From the Window Menu select Read, and then choose Paste from the toolbar.

Setting Window Properties for the Response Read Window

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.

Setting Form Properties for the Response Read 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:

1. On the Main window toolbar, click the Form Properties button.

2. In the Form Display Name box inside the General tab, type Personnel Profile Information Response.

To set the version, number and item type, follow these steps:

1. In the Version box, change the number to 1.00.

2. In the Number box, type PINFO7.2.

3. In the Item Type box, change the item type to IPM.PersonnelProfileInformationResponse.

To set the form description, follow these steps:

1. In the Description box, type Use this form to fill out and send Personnel profile and emergency information to the Personnel Profile Information folder.

2. Choose Close.

Saving and Installing the Response Form

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.

Creating the By Team View

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:

1. In the Exchange Client, select the properties for the Personnel Profile Information folder.

2. Find the Views tab and choose New.

3. Be sure to Remove any fields from the Show the following columns box, so that it is empty when you start to add fields.

4. In the Available Columns box, select Teams and Consultant's Name and then double-click them separately.

5. Set the column width of the fields as follows:

Teams  36

Consultant's Name  36

6. Choose OK.

7. In the Group Items By drop-down box, select teams, choose OK, and then choose OK again.

Setting Permissions

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:

1. Select the Personnel Profile Information folder and then choose Properties from the File menu.

2. In the Properties dialog box, select the Forms tab.

3. Select the Only Forms Listed Above option button, and then choose OK.

Testing the Application

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:

1. Select the Personnel Profile Information folder.

2. From the Compose menu, choose New Personnel Profile Information Request. The Request form's Compose window appears.

3. In the To box, type your name and then press Ctrl+K to resolve the address. Then click the Send Button.

4. Select the Inbox and double-click your new mail. The form will install (if it hasn't been installed on your computer before) and display the read version of the Request form.

To test the Response form, follow these steps:

1. Select the Personnel Profile Information folder.

2. From the Compose menu, choose New Personnel Profile Information Response. The Response form appears.

3. Fill out the appropriate information. Then click the Post button located at the top right of the Response form. This action will post the form to the Personnel Profile Information folder.

4. Select the Personnel Profile Information folder and then make sure the view is set to teams. Click the plus symbol next to the appropriate team and then double-click the consultant's name. This action displays the form with the information you requested. Tab through it and make sure it is correct. Because it is posted in the Personnel Profile Information folder, the information can always be changed.

Adding a Button to the Form with Visual Basic

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:

1. In Visual Basic, choose Open Project from the File menu.

2. Select the pqinfo.vbp file, which is located in the directory path you created earlier in this chapter to house all project files for this application.

3. The directory name will be PQINFO.vb. Here is an example: C:\EXCHANGE\EFDFORMS\PQINFO.VB\pqinfo.vbp.

4. After the project has been loaded, double-click the COMPOSE.FRM from the Project window.

To add the Command button to the form, follow these steps:

1. If the toolbox is not visible, select toolbox from the View menu.

2. Click the Command button and then add it to the Compose form.

3. While the Command Button is still selected, press the F4 key on your keyboard. This opens the Properties dialog box. Set the Command button's Caption property to Open &Personnel Profile Information Response Form. Then set the Enabled property to False.

Cleaning up the Form Window

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.

Increasing the Canvas Size

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:

1. Before you can select the CanvasParent control to resize it, you must first reposition the Canvas Ctrl inside the CanvasParent, as shown in Figure 33.47.

FIG. 33.47 Increasing the size of the Canvas Ctrl.

2. Select the CanvasParent control, and then resize it until it looks like Figure 33.48

FIG. 33.48 Visual representation of how the CanvasParent control should look after resizing.

Adding Code to the Command Button

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.

Copying Command Button and Code Contents to the READ.FRM

To copy the Command button and code contents to the READ.FRM, complete the following steps:

1. Right-click the Command button and choose Copy.

2. Return to the Project window and double-click READ.FRM. Repeat the steps to clean up this form as explained in the "Cleaning up the Form Window" section.

3. Select READ.FRM and paste the Command button on the form.

4. Double-click the Command button and insert the same code you inserted earlier in the Command button on the COMPOSE.FRM.

5. Save this project by selecting Save Project from the File menu of Visual Basic.

Making an .EXE File

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.

Reinstalling the Personnel Information Request Form

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:

1. In the Microsoft Exchange Client, select the Personnel Profile Information folder.

2. From the File menu, choose Properties and then select the Forms tab.

3. Choose the Manage button and then click the Install button.

4. Double-click the pqinfo.cfg file, which is located in the pqinfo.vb directory. If you are asked to overwrite an existing executable, choose Yes.

To check and see if you have the right form, select the Personnel Profile Information folder and select the request form from the menu.

Outlook Forms Development

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.

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:

Outlook Form Categories

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 Built-in Forms

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:

1. Select the folder where your Application will be stored.

2. Select Choose form from the Compose menu.

3. Select the Application form that is best for the application you have in mind.

4. Select Tools from the menu of the running forms and select Design Outlook Form.

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.

Creating a Custom Form

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:

1. Right-click your Inbox and choose Create Subfolder.

2. In the name box, type Tech Solutions and click OK.

3. Select the Tech Solutions folder you just created. At this time, you can type a description for the folder and create a shortcut on the Outlook bar.

4. Click Compose from the menu and then select Choose Template.

5. Select the Post it template.

6. From the Tools menu of the Post Template, select Design Outlook Form.

7. Click the (P.2) tab and then select Form from the menu. Choose Rename Page type Discussions for the Tab Page Control.

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:

1. Click the Control toolBox and drag the combo box control to your Page Control, named Discussions.

2. Click the Label Control and drag that to the form, resizing it as necessary. The caption for the Label Control should be Topics of Interest.

3. Right-click the Combo Control and choose Properties.

4. Click the New button and type txtTopics of Interest in the name field.

5. Type SMS, Exchange, SQL Server, IIS, and Active Server Pages in the Possible values box (these titles should all be separated by a comma). Click OK.

Publishing the Form

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:

1. Select File from the menu and choose Publish Form As. Make sure that the name of your form is displayed next to the Publish In area.

2. In the forms name area, type Technical Discussion Form and click OK.

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.

Exporting Your Forms and Outlook Applications

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.

Form Views

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. 


Previous chapterNext chapterContents