One of the quickest ways to develop MAPI applications is to use the Microsoft Exchange Forms Designer kit. This tool ships with the Microsoft Exchange Server and includes a GUI form designer tool, sample templates, design wizards, and an installation wizard. The Microsoft Exchange Forms Designer (called the EFD) generates Visual Basic 4.0 code. Once the forms are generated, you can also use Visual Basic 4.0 to modify and enhance the forms.
Note |
For those who do not own a copy of Visual Basic 4.0, the Microsoft Exchange Forms Designer includes a version of the Visual Basic 4.0 16-bit compiler. |
To get the most out of this chapter, you should have access to a copy of the Microsoft Exchange Forms Designer on your machine. You do not have to be linked to a Microsoft Exchange Server to complete the project in this chapter. If you do not have a copy of the Microsoft Exchange Forms Designer, you can still get a lot out of this chapter. The concepts and techniques discussed here apply to any project that uses Microsoft Exchange as a message platform. The last section of the chapter focuses on folder views. You do not need the Microsoft Exchange Forms Designer to complete the exercises in that section of the chapter.
You can use the EFD to develop two different types of forms:
You can also use the EFD to design folder views. Folder views are rules that control just how a folder appears to the users. By setting values such as Sort Order, Message Grouping, and Message Filtering, you can present folder contents in ways that reflect users' needs and highlight the most important aspects of the message collection.
When you complete this chapter, you'll know how to design, code, test, and install customized forms and folders using the Microsoft Exchange Forms Designer. You'll learn how to use the EFD to create a Send form and a Post form. You'll also create several new folders with custom views. Finally, you'll learn how to link customer forms to folders.
The Microsoft Exchange Forms Designer is a development tool that is a part of Microsoft Exchange Server. The EFD is a complete design tool for the creation and management of customized electronic message applications. You can design forms that perform various tasks, including forms that
The Microsoft Exchange Forms Designer uses the Visual Basic development environment. If you are familiar with Visual Basic or Microsoft Access, you'll have no trouble learning to use the Microsoft Exchange Forms Designer. Even if you have not had a lot of experience with Visual Basic or Access, you'll find the EFD environment easy to work with.
Most of the form design work involves drag-and-drop operations to add fields to a form. When you use the EFD wizards, toolbars, and menus, most of the basic message fields (To, Cc, Subject, and so on) are automatically added to your forms. You can add custom controls such as labels, text boxes, list and combo boxes, check boxes and radio buttons, and even tabs, frames, and picture boxes. One of the controls available with the Microsoft Exchange Forms Designer is a 16-bit version of the rich-text control. This allows users to select fonts, type sizes, and colors within an editable text box.
Another very handy feature of the Microsoft Exchange Forms Designer is the ability to add field-level and form-level help to the project without having to create a WinHelp file. The EFD's QuickHelp allows you to enter help information for each control on the form and for the form itself. You can create a message that appears on the status bar at the bottom of the form. You can also create a message window that acts as context-sensitive help whenever the user presses the f1 key. And if you are really serious, the EFD allows you to enter help context IDs that link to standard WinHelp files.
It is also possible to use the Microsoft Exchange Forms Designer to generate an initial form and then use Visual Basic to modify the form, for example, by
Although it is possible to use Visual Basic alone to design and implement Microsoft Exchange forms, the EFD provides several advantages over "pure" Visual Basic. With the Microsoft Exchange Forms Designer, you get a tool that handles most of the drudgery of linking message fields to form controls. The EFD helps you establish a consistent look and feel for all your forms. The EFD also walks you through the installation process, which involves creating a custom message type, registering that message type with Microsoft Exchange, and creating a configuration file to link the form to Microsoft Exchange.
In this section, you'll use the Microsoft Exchange Forms Designer to create a job request form to initiate requests to have maintenance jobs completed in a workplace. This will be a single-window Send form (addressed to a user). After you build the form, you'll install it into your personal forms library for use at any time.
The easiest way to start developing forms with the Microsoft Exchange Forms Designer is to use the Forms Designer wizard. The wizard will take you through the initial steps in creating an electronic form. Once you answer all the wizard's questions, you'll see the EFD build a basic form for your use. You can then use the EFD to modify the project before saving and installing the new application.
If you haven't already done so, start up the Microsoft Exchange Forms Designer. You can do this from the Microsoft Exchange program group. To do this, press the Start button on the Windows 95 task bar. Then select Programs | Microsoft Exchange | Microsoft Exchange Forms Designer. You can also start the EFD directly from Microsoft Exchange. To do this, start Microsoft Exchange and log in to your e-mail system. Then select Tools | Application Design | Forms Designer... (see Figure 5.1).
Figure 5.1 : Selecting the EFD from the Windows Messaging client.
Tip |
Starting the EFD from the Microsoft Exchange menu takes more memory. On some systems, it may seem a bit slower than starting EFD from the program menu. However, when you're developing an EFD form, it's really handy to have Microsoft Exchange up and running at the same time. That way you can easily switch between design and test mode while you debug your EFD application. |
The first screen you'll see is the Forms Designer Wizard. It asks whether you want to begin a new project using the wizard, load a template form, or open an existing form (see Figure 5.2).
Figure 5.2 : Starting the Microsoft Exchange Forms Designer Wizard.
For now, select the Form Template Wizard option and press Next to continue.
The wizard asks whether you are designing a Send form or a Post form (see Figure 5.3).
Figure 5.3 : Creating a Send form or a Post form.
Send forms are used to send messages directly to one or more users. Send forms have a field on the form for the "To" and "Cc" fields of a message. Post messages are sent to a folder, not a person, and therefore do not have a "To" or a "Cc" field on them. For our example job request form, you want to use a Send form. This will make sure that the form is sent directly to a person. Select Send and press Next.
The wizard next asks whether you are creating a form to send information to someone or a form to respond to an existing EFD form (see Figure 5.4).
Figure 5.4 : Creating a Send-or Response-type form.
The first option allows you to create an "initiating" form. The second option allows you to create a response form. For now, select the Send option and press the Next button.
Warning |
Don't confuse the Send option on this screen with the previous screen where you were asked if you wanted to create a Send or a Post form. This screen is really asking you to describe the action of your form-send or respond. The previous screen asked about the destination of your form-a person or a group. |
The wizard now asks whether you want your form to have one or
two windows (see
Figure 5.5).
Figure 5.5 : Specify a one-window or two-window form.
You use single-window forms when you want to allow the reader to be able to edit the same fields filled out by the sender. A good example would be a form that you send to people with information for their editing and final approval.
You use the two-window form when you do not want to allow readers to alter the data on the form that they read. When you select a two-window option, the EFD creates a compose form and a read form. The compose form appears when a user first creates a form to send to someone. When the recipient opens the two-window form, only the read form appears. This form has the same controls as the compose form, but the fields are all read-only.
For this example, select the one-window option and then press Next.
Finally, the Forms Designer Wizard asks you to supply the name and general description of your form (see Figure 5.6).
Figure 5.6 : Setting the form name and description.
The name you enter appears in list boxes (and in some cases on
menus) within the Windows Messaging client. The description you
enter appears in information dialog boxes that users can view
when selecting Microsoft Exchange forms from their client interface.
For now, enter the information contained in Table 5.1.
Property | Setting |
Name | Job Request Form |
Description | Use this form to initiate a job request to the maintenance department. |
After you supply the form name and description, press Next. The wizard displays a final screen telling you that you have completed the wizard steps (see Figure 5.7).
Figure 5.7 : The final screen of the Forms Designer Wizard.
At this point you could press the Back button to return to previous screens and make any changes needed. When you are sure that all screens have been completed properly, select Finish to close the wizard.
Your form should look like the one in Figure 5.8.
Figure 5.8 : The results of the Forms Designer Wizard.
You now have a basic electronic form ready for final modification and use. You can see that the top part of the form has been filled in with the Date and From fields. These will be filled in automatically when you first execute the completed form. You'll also see the To, Cc, and Subject fields. These fields will be filled in by the person executing the form.
The rest of the form has been left blank. It will contain application-specific controls and information. In the next few sections, you'll add labels, input boxes, list controls, and a picture control to the form.
Before going further, save this project as JOBREQ.EFP.
Now that you have the basic electronic form built, it's time to add the fields needed to collect and display specific data. To do this, you add controls for new fields and set the field properties. After adding all the needed fields, you set a few form-level properties, add some help, and you're ready to install and test your form.
It's very easy to add fields to the form. All you do is click once on the toolbox object you want to use, then move your mouse to the desired location on the form, and click once again to drop the object onto the form.
Warning |
If you're used to Visual Basic, you'll discover that the method for dragging and dropping form objects is slightly different here. You do not paint the objects onto the EFD form as you do in Visual Basic. Here you just click, point, and click. |
As a test, select the Entry Field object (called a text box in Visual Basic) and drop it onto the body of the form.
Note |
You'll notice that you cannot use the EFD to place standard form objects in the header area of the form. You can, however, place one of the MAPI fields (From, Date, To, Cc, Bcc, and Subject) on the header. |
Notice that the control is placed on the form along with an associated
label control (see
Figure 5.9).
Figure 5.9 : Adding on Entry Field object to the form.
You can click on the label in design mode to edit the contents. You can also use the anchors on the object to move or resize it as needed. It is also possible to "unlink" the caption and input control by selecting the large square on the upper left of the input control and moving it independently of the caption.
Tip |
Deleting the caption from the input form will also delete the input control itself. You can use the General tab of the Field Properties dialog box (double-click the control) to remove the caption. Locate the Position drop-down list and set its value to None. |
Now that you've added a field to the form, you need to adjust several of the field's properties. In the next section, you'll learn how to do this using the Field Properties dialog box.
The Field Properties dialog box gives you access to several properties of the field object (see Figure 5.10).
Figure 5.10 : Viewing the Field Properties dialog box.
This dialog has three tabs:
Use Table 5.2 as a guide in setting the field properties of the
text box field on your job request form.
Tab | Property | Setting |
General | Reference Name | ContactPhone |
Column Name | Contact Phone | |
Field Caption | Contact Phone: | |
Required | (Checked) | |
Format | Maximum Characters | (Checked) 80 |
Initial Value | Initial Text | XXX-XXXX |
After setting the properties on the three tabs, select Close to save the information.
You need to add several fields to the job request form before it is complete. Now that you have an idea of how to add fields and set their properties, use the information in Table 5.3 and Figure 5.11 to add, size, and locate the remaining fields on the form.
Figure 5.11 : Laying out the Job request form.
Tip |
The area of the EFD form where you place your controls is scrollable. It is very easy to lose one or more fields due to unexpected scrolling when you place a control on the form. To make it easy to see where things are on the form, you need to turn on the scroll bars. Select View | Show Scroll Bars from the main menu. If you do not want users to see these at runtime, turn them off before you install the form. |
Note |
Be sure to use a complete path/directory name for the Picture Field control in Table 5.3. You can find the Chap05 directory under the main directory created when you installed the source code from the CD-ROM that ships with the book. |
After adding all the fields and setting their properties, save the project (JOBREQ.EFP) before continuing with the next step.
There are several form- and window-level properties that you can set for Microsoft Exchange forms. These settings affect the way your form looks and behaves once it's up and running under Microsoft Exchange.
First, select View | Window Properties
from the main menu. Then set the properties using the information
in Table 5.4.
Control | Property Tab | Property | Setting |
Entry Field | General | Reference Name | ContactPhone |
Column Name | Contact Phone | ||
Field Caption | Contact Phone: | ||
Required | (Checked) | ||
Left | 1290 | ||
Top | 90 | ||
Width | 2400 | ||
Height | 300 | ||
Format | Maximum Characters | (Checked) 80 | |
Initial Value | Initial Text | XXX-XXXX | |
ComboBox Field | General | Reference Name | JobType |
Column Name | Job Type | ||
Field Caption | Job Type: | ||
Required | (Checked) | ||
Left | 1290 | ||
Top | 545 | ||
Width | 2400 | ||
Height | 300 | ||
Format | Style | DropDown List | |
Initial Value | List Values | Cleaning | |
Construction | |||
General | |||
Plumbing | |||
Frame Control | General | Reference Name | Priority |
Column Name | Priority | ||
Field Caption | Priority: | ||
Required | (Checked) | ||
Left | 120 | ||
Top | 1155 | ||
Width | 1050 | ||
Height | 1545 | ||
OptionButton Field | General | Reference Name | Priority_1 |
Field Caption | High | ||
Left | 120 | ||
Top | 240 | ||
Width | 900 | ||
Height | 300 | ||
Initial Value | Unselected | (checked) | |
OptionButton Field | General | Reference Name | Priority_2 |
Field Caption | Medium | ||
Left | 120 | ||
Top | 560 | ||
Width | 900 | ||
Height | 300 | ||
Initial Value | Selected | (checked) | |
OptionButton Field | General | Reference Name | Priority_3 |
Field Caption | Low | ||
Left | 120 | ||
Top | 880 | ||
Width | 900 | ||
Height | 300 | ||
Initial Value | Unselected | (checked) | |
OptionButton Field | General | Reference Name | Department |
Column Name | Department | ||
Field Caption | Department: | ||
Caption Position | Top | ||
Left | 1350 | ||
Top | 1260 | ||
Width | 2415 | ||
Height | 1570 | ||
Required | (checked) | ||
Initial Value | List Values | Administration | |
Customer Service | |||
Production | |||
Repairs | |||
Sales | |||
Check Box Field | General | Reference Name | Affects Production |
Column Name | Affects Production | ||
Left | 3945 | ||
Top | 120 | ||
Width | 1770 | ||
Height | 300 | ||
Caption: | Affects Production? | ||
Initial Value | Unchecked | (checked) | |
Entry Field | General | Reference Name | Description |
Column Name | Description | ||
Left | 3945 | ||
Top | 900 | ||
Width | 2265 | ||
Height | 1785 | ||
Caption | Description: | ||
Caption Position | Top | ||
Required | (checked) | ||
Format | Allow Multiple Lines | (checked) | |
Vertical Scroll Bars | (checked) | ||
Initial Values | Initial Text | Describe the nature of the problem | |
Picture Field | General | Reference Name | Logo |
Omit this field | (checked) | ||
Left | 6360 | ||
Top | 60 | ||
Width | 1620 | ||
Height | 2640 | ||
Format | Stretch Picture | (checked) | |
Initial Value | Picture | chap05\efd\clipbord.wmf |
Dialog Tab | Property | Setting |
General | Window Name | JobRequestWindow |
Window Caption | Job Request Form | |
Fields in Tab Order | MAPI_To | |
MAPI_Subject | ||
ContactPhone | ||
JobType | ||
Priority_1 | ||
Priority_2 | ||
Priority_3 | ||
Department | ||
AffectsProduction | ||
Description | ||
Format | Maximize Button | (off) |
Minimize Button | (off) | |
ToolBar | (off) | |
Formatting Toolbar | (off) | |
Status Bar | (on) | |
Window Sizing Options | Fixed Size |
Next you need to set the form-level properties. Select View
| Form Properties from the main menu. Refer to Table
5.5 for the proper settings.
Tab | Property | Setting |
General | Form Display Name | Job Request Form |
Version | 1 | |
Number | 1 | |
Item Type | IPM.JobRequest |
You will note that the first time you bring up a new form, the Item Type property is set to a long string of letters and numbers. This is a GUID (guaranteed unique ID). Microsoft Exchange uses this ID value internally to identify the form. The value you enter here does not have to be this cryptic. It is a good idea to enter a value that will mean something to you and others in your organization. It is, however, important that you keep this name unique.
Save this project again (JOBREQ.EFP) before you go on to your last development step-adding help.
It is very easy to add online help to your electronic forms. The Microsoft Exchange Forms Designer has a built-in QuickHelp feature that lets you build tooltips and pop-up help boxes at the field, window, and form levels. You can even add notes to the design-time version of the form for tracking development issues.
First, let's add a few notes to the design-time form. Select Help | Designer Notes... from the main menu to bring up the Designer Notes screen (see Figure 5.12).
Figure 5.12 : Viewing the Designer Notes screen.
Enter a short comment about the form, the date, and the author. The information you enter here is stored with the project and will be available each time you load the project into the Microsoft Exchange Forms Designer. Notice that this is a rich-text box. You can set the font type, size, and color at any time.
You can also have a help pop-up at the form level. To do this, bring up the Form Properties page (select View | Form Properties | General Tab) and press the Form Help... button. You'll see a dialog box like the one in Figure 5.13.
Figure 5.13 : Adding form-level help.
Notice that you can select No Help, QuickHelp, or enter a context ID for a standard WinHelp file. For now, enter a short comment into the QuickHelp pop-up box and press Close to save the form. You can also set the Windows Caption by moving the cursor up into the title bar of the sample help window and typing a caption.
You can enter help at the window level, too. This is most useful when you have a project with multiple windows. For now, select the Window Properties dialog box (View | Window Properties | General) and press the Window Help... button. Your screen will look like the one in Figure 5.14.
Figure 5.14 : Viewing the window-level help dialog box.
Notice that you have an additional control on this dialog box. If you have multiple windows in your project, you can use the drop-down list control to select each window and enter unique help information.
Finally, you can also enter help information at the field level. Double-click a field object or select View | Field Properties | General Tab to bring up the Field Properties dialog box. Then press the Field Help... button to view the help dialog box (see Figure 5.15).
Figure 5.15 : Viewing the Field Help for Users dialog box.
Notice that there are now two controls at the top of the help dialog box. The drop-down list can be used to select the field for which you want to create a help topic. The Status Bar control lets you enter a short help line that will appear at the bottom of the form as you select each field. Of course, the QuickHelp box contains the help information that will appear in a pop-up box if you press f1 at run-time while a field is in focus.
Enter QuickHelp information for several fields and then save the project. Save your project as JOBREQ.EFP before continuing with the last step-installing and testing your new form.
After you have completed the development phase of your Microsoft Exchange form, you need to run the Install routine from the Microsoft Exchange Forms Designer. This routine
This entire process may take awhile, depending on the size of your project and your hardware configuration. If you do not have the project loaded now, open the Microsoft Exchange Forms Designer and load the JOBREQ.EFP project.
Select File | Install... from the main menu. You'll see a small dialog box telling you that the Microsoft Exchange Forms Designer is generating Visual Basic code. Then you'll see Visual Basic 4.0 load and compile the project.
After Visual Basic finishes, you'll see a dialog box that asks you where you want to install the form (see Figure 5.16).
Figure 5.16 : Selecting a forms library for installation.
Select Personal Forms Library for now. This will install the form on your workstation. Once you have tested it thoroughly, you can re-install the form on a network location to allow others to use the form.
After selecting a forms library, you'll be asked to fill in a few more questions about the form (see Figure 5.17). The information in these fields is used by Microsoft Exchange to categorize your form. Forms are sorted and grouped to make them easier to locate and use.
Figure 5.17 : Supplying the form properties for Microsoft Exchange.
For now, enter your initials for the first category and Help for the second category. Enter your initials again as the contact person. Notice that several of the fields you set in design mode appear here, too.
Your new Microsoft Exchange form is now installed. Exit the Microsoft Exchange Forms Designer and switch to your Windows Messaging client so that you can start testing your new form.
Once you have installed the form, you can switch to Microsoft Exchange and run it. In the previous step, you installed the form in your personal forms library. In order to start an instance of the form, you need to launch your Windows Messaging client and select Compose | New Forms... from the main menu. You'll see a dialog box that lists all the forms you have in your personal library (see Figure 5.18).
Figure 5.18 : Viewing your personal forms library.
Select the job request form from the list to launch an instance of the form. You'll see the form appear with several fields already filled in with suggested entries (see Figure 5.19).
Figure 5.19 : Viewing the job request form at run-time.
Complete the form and send it to yourself. Then check your inbox for the arrival of the message.
Tip |
If your server is slow in returning your form to you, select Tools | Deliver Now Using... | Microsoft Exchange or Tools | Deliver Now Using... | Microsoft Mail if you are running a standalone version of Microsoft Exchange for Windows 95. |
When you open the message, you'll see that it appears in the same electronic form that it was sent in. If you select Compose | Reply from the main menu of the form, you'll see your form automatically convert the data on the application into a text message (see Figure 5.20).
Figure 5.20 : The reply gets converted into a text message.
You can now fill out a response to the request and return it to the person who sent you the note (in this case, yourself!).
You can use the Microsoft Exchange Forms Designer to create a response form that reads information from the job request form and includes that data automatically on the response form. You can also create Post forms that are not addressed to users, but to folders. These Post forms help you control discussion groups and other public data sharing in your organization.
The Microsoft Exchange Forms Designer ships with several example projects that illustrate using multiwindow forms and using several forms together to create a set of send/respond forms. Check out the Templates folder and the Samples folder for more examples of Microsoft Exchange forms development.
In the next section, you'll learn how to create folder views and then how to install an electronic form in a folder.
Another very easy and powerful way to create custom MAPI interfaces is to use the Windows Messaging client's capabilities to create and control folder views. Folder views are an excellent way to set up customized views of the message base. You can create folder views that show and group messages according to their subject. You can also create views that show only selected items in the folder based on subject, sender, or several other criteria.
In effect, you can use folder views to narrow the scope of your incoming messages. This is especially handy in large organizations where you get a lot of information and must focus on the most important messages first.
In this section, you'll learn how to create a new discussion folder and establish its view properties. You'll then write several messages to test the folder view. Finally, you'll install a form in the folder. This way every time someone wants to post a message to the folder, he or she can use the custom form.
Note |
You need to have access to the Windows Messaging client that ships with the Microsoft Exchange Server. That version has the capability to create folder views. You do not, however, have to be connected to the Microsoft Exchange Server to create folders and views. This example uses personal folders and views. |
Creating folder views is the easiest way to build custom discussion applications using Microsoft Exchange. You can create a specialized view, test it on your personal system, and then publish it for others to use. You can even use the Microsoft Exchange Forms Designer to create custom posting forms for use in the discussion forum. These forms can be installed in the folder itself and will be available to anyone who enters the forum.
There are just a few steps to creating a custom folder and view:
The first step is to create a new folder. If you haven't done so yet, start the Windows Messaging client and select your personal message store. Point to the top level of the message store and add a new folder called "MAPI Discussion Group" (see Figure 5.21).
Figure 5.21 : Adding the Mapi Discussion Group Folder.
Once the folder is created, it is a good idea to set its Description property. This description will help everyone know what kind of information is supposed to be in the folder. It is also a good idea to add the name of the person who created the folder and the date it was first created. To set the Description property of a new folder, select the folder, and then select File | Properties from the main menu. Enter a general description of the folder along with a creation date and the author's initials (see Figure 5.22).
Figure 5.22 : Setting the folder's Description property.
Once you fill in the description, press the Apply button or the OK button to update the folder properties.
The folder view controls just which messages are seen by the user, along with the order in which they are seen and what message columns appear in the summary listing. There are four main steps to setting a folder view:
Once you have set all the view properties, you can test the folder view by posting messages to the folder.
First, highlight the MAPI Discussion Group folder again and select File | Properties to bring up the Folder Properties page. This time select the View tab. Be sure the Folder Views radio button is selected and then press the New button to create a new view.
The first step is to name the folder view. Enter "Group By Conversation Topic."
Tip |
It is a good habit to name views based on grouping and sorting criteria. That way, as you build up a library of folder views, it is easy to remember how the view affects the message displays. |
The next step is to select the columns to be displayed in the list window. Press the Columns button to bring up the Columns dialog box (see Figure 5.23).
Figure 5.23 : Selecting the columns for the list window.
Locate and select the Conversation Topic column from the list box on the left. Add this column to the very top of the list box on the right. Now delete the From column from the list box on the right. You can save this selection by pressing OK.
Tip |
You may have noticed that there is a small input box at the lower right-hand side of the dialog box. This input box allows you to set the display width of each column in the list. The Conversation Topic column defaults to one character. You do not need to change this. When messages are grouped together, their topic will appear as a header within the listing. Adding the conversation topic to the listing would only clutter the display. |
Next you need to set the grouping value. Press the Group By button to bring up the Group By dialog box (see Figure 5.24).
Figure 5.24 : Setting the grouping criteria.
In the topmost combo box, select Conversation Topic and select the Ascending radio button. Notice that you can set the sort order by activating the combo box at the bottom of the Group By dialog box. It should be set to Received, Ascending. If it is not, set it now, and then press OK to update the grouping and sorting properties.
Now select the Filter button from the Views dialog box. This calls up the first of two filter dialogs boxes (see Figure 5.25).
Figure 5.25 : The first Filter dialog box.
Through this dialog box, you can set criteria for limiting the display of messages:
You can also set additional filter criteria by pressing the Advanced button on the Filter dialog box (see Figure 5.26).
Figure 5.26 : Viewing the Advanced Filter dialog box.
A second form appears through which you can set filters based on file size, date ranges, read/unread flags, and level of importance. You can also set filters based on forms ("show me only Job Request Forms") or document statistics ("show me only Word documents").
For now, select Cancel from the Advanced Filter dialog box and select Clear All at the main Filter dialog box to turn off all filtering.
Warning |
It is important to remember that setting message filters affects only the display of message folders, not their content. If you have a folder that filters all but a few messages, you should keep in mind that there may actually be hundreds of messages in the folder, it's just that you can see only a few. Message filtering will not remove messages from a folder; it just hides them. |
Under the Views tab of the Folder Properties dialog box, press Apply to update the properties and then select OK to exit the dialog box. You have created a custom view for your folder. Now it's time to test the view.
To test the new folder view you just created, you need to add a few messages. For now, you can add these messages and replies yourself. Once you are sure the view is working properly, you can place this view in a new or existing public folder and share it with other users.
Since this view was built as a discussion forum, you'll use a Post form instead of the standard Send form. To create a new post in the MAPI Discussion Group, highlight the folder and select Compose | New Post in this Folder... from the main menu. This will bring up the default posting form (see Figure 5.27).
Figure 5.27 : Using the default posting form.
After filling out the form and posting it, check the folder to see how the view works. You'll see that a conversation topic has been started and that your first message appears underneath the topic. You can click on the topic to expand the message listing and then select the message to read it. When you create a reply to the message, it is added to the folder, under the same topic. Figure 5.28 shows you how an extended set of messages appears in a discussion folder.
Figure 5.28 : Viewing multiple messages in a discussion folder.
Note |
Although the folder we created is a discussion folder, you are not restricted to using Post messages while you are in the folder. If you wish, you can use Send forms to reply directly to a user's inbox. This is a way to start private conversations with people you first meet in a public discussion group. |
Although there's a lot more to creating and managing folders and views, you should now have a pretty good idea of the possibilities. If you are interested in learning more about Microsoft Exchange folders and views, check out the documentation that ships with the Microsoft Exchange Server.
The final step in this chapter is to install a custom form in a folder. You can install forms in personal forms libraries or folder forms libraries. The advantage of installing forms in the personal forms library is that it is available to the users no matter what other folder they are looking in. All they need to do is select Compose | New Forms... to locate the form installed on the local workstation.
The advantage of installing forms in a folder form library is that each time the user enters the folder, that custom form appears on the Compose menu. This makes it easier to find and more likely that it will be used.
For this example, you'll install the job request form in the MAPI Discussion Group folder.
Note |
It actually doesn't matter what folder you use for this exercise. |
First, start up the Windows Messaging client and select the target folder (the MAPI Discussion Group folder). Then select File | Properties and select the Forms tab. This brings up the Forms page. Press the Manage button to display the Forms Manager dialog box, and press the Set button above the list box on the left to bring up the Set Library To dialog box (see Figure 5.29).
Figure 5.29 : Setting the forms library.
You've seen this dialog box before. It's the same one you used when you used the Microsoft Exchange Forms Designer to install the job request form. Select the Personal Forms Library radio button; then press OK to return to the Forms Manager.
You'll now see one or more topics and forms in the list box on the left side of the form (see Figure 5.30).
Figure 5.30 : Selecting a form to install.
Locate and select the job request form in the list box on the left. Then press Copy to copy the form to the list box on the right. You have just associated the job request form with the MAPI Discussion Group folder. Now it's time to install the form in the folder's library.
When you press Install..., Microsoft Exchange asks you for the location of the configuration file (.CFG) for the form. This is stored in the subfolder in which you created the job request form. Locate the folder where you saved the JOBREQ.EFP file. You'll see a subfolder called JOBREQ.VB. This is the folder that has the Visual Basic source code and the JOBREQ.CFG file (see Figure 5.31).
Figure 5.31 : Locating and selecting the JOBREQ.CFG. file.
After locating and selecting the JOBREQ.CFG file, click OK to load the configuration file. Microsoft Exchange will then show you the Form Properties dialog box from the Microsoft Exchange Forms Designer. Select a category and a subcategory, and enter your initials as the contact name for the form (see Figure 5.32).
Figure 5.32 : Filling out the Form Properties dialog box.
Now you can press Close on the Forms Manager dialog box and press OK on the Form Properties tab page. You have just installed your form into the MAPI Discussion Group folder.
Select Compose from the main menu, and you'll see an item at the bottom of the menu list called "New Job Request Form" (see Figure 5.33).
Figure 5.33 : Selecting the new job request form the menu.
You can start from here and run the job request form just like any other form. If you move to another folder, however, you will not see the form on the menu. It appears on a folder's menu only if it has been installed in that folder's form library.
In this chapter, you learned how to use the Microsoft Exchange Forms Designer kit that ships with Microsoft Exchange Server. You learned how to design, code, test, and install custom message forms for use at individual workstations or over a large network.
The Microsoft Exchange Forms Designer discussion in this chapter covered
You also learned how to set up Microsoft Exchange folders for
use with custom forms,
including
In the next chapter, you'll learn how to use the Messaging API to create MAPI-aware windows applications that can read and write MAPI messages from outside Windows Messaging clients.