Folders are the focal point for any Outlook application. They hold data; views for that data; and forms, agents, and rules. They provide users with a storage location for information and a hierarchy structure that makes finding information easy.
In Outlook, you can create folders in three places: in your mailbox stored on the Microsoft Exchange Server, in your personal folders stored on your computer's hard disk, and in public folders. Each of these locations has advantages and disadvantages. For example, if you create a new folder in your personal folders, you cannot easily share it with other users in your organization. In addition, you cannot set permissions on it. (In this book, we use public folders for storing application data.) Many of the properties you can set on public folders are applicable to the other two types of folders.
NOTE
Some of the steps and figures in this chapter are based on a user having permissions to create public folders. If you can right-click on a public folder and choose New Folder, you have permission to create a subfolder. If you are unable to create a public folder, contact your Exchange Server administrator to see whether a public folder is available to you that will allow you to create folders. If no public folder is available to you, ask your Exchange Server administrator for the proper permission.
To help you work through the rest of the chapter, we are going to look at three simple applications that use the different building blocks of Microsoft Outlook: a threaded discussion application, an account tracking system, and a document library application. Each of these applications needs its own separate public folder to store its data.
To create a public folder for each application, follow these steps:
NOTE
Outlook allows you to set the default type of item contained in the folder. If you were creating a public folder of task items, you would select Task Items from the drop-down menu. The folder can hold other types of items besides the default item you select.
After creating the folders, you need to customize their properties for your application. Outlook automatically creates and sets certain properties of the folder for you. For example, Outlook creates common views for a folder based on the default type of folder you select. For a calendar folder, Outlook creates default calendar views such as day/week/month and active appointments; for a contacts folder, Outlook creates default contact views. You can change the default properties for a folder in the folder's Properties dialog box: right-click on a folder in the folder list, and select Properties from the context menu. The properties for the folder appear. Figure 4-1 shows the Properties dialog box for a Job Candidates application.
Figure 4-1 The Properties dialog box for a Job Candidates application.
The General tab allows you to modify the general properties of a folder. In addition to specifying the folder name and describing the folder, you can do the following tasks:
The folder's Administration tab enables you to perform common administrative tasks. The following sections describe them.
On the Forms tab, you can specify which forms are associated with a folder. You can also restrict which forms users can post to the folder. Clicking the Manage button displays the Forms Manager dialog box, as shown in Figure 4-2. The Forms Manager allows you to copy custom forms from other folders or forms libraries into the current folder. You can also update or delete forms.
Figure 4-2 The Forms Manager dialog box allows you to modify forms associated with the current folder.
The Permissions tab, shown in Figure 4-3, allows you to set user and group permissions for your folder and its items so that only those features you want your users to access are exposed. To modify these permissions, you need to be an owner of the folder. By default, when you create a folder, Outlook gives you owner rights. This means you have the full range of permissions to create, edit, or delete items in the folder. You can also change the permissions of other users in the folder.
When you first open the tab, you see that the default role for users is set to Author. This role corresponds to a set of permissions on the folder: users have the ability to view the folder, create and open items in it, and delete and edit their own items.
To learn how to set permissions for our Document Library and Account Tracking applications, follow the next set of steps. We'll limit who can create and edit documents in the folder to only users in our division, but we'll enable all users to at least read the information in our Document Library.
Figure 4-3 On the Permissions tab of the Properties dialog box, you can add, delete, or modify the permissions that users have on the current folder.
Follow the same steps for the Account Tracking application, with these exceptions:
Figure 4-4 Permissions for the Document Library application.
Figure 4-5 shows an Outlook user browsing the public folder hierarchy. Notice that the Account Tracking folder is not visible to this user because he does not have the Folder Visible permission.
Selecting Individual Permissions vs. Selecting RolesOutlook provides roles with associated permissions so that you do not have to select each permission individually. If you wanted to create a custom role, you would select the permissions individually, and Outlook would apply these permissions to any type of item in the folder. For example, try dragging and dropping some Microsoft Word documents into the Document Library folder. Log into Outlook as a different user. This user is assigned the default permissions for the folder, meaning that all documents in the folder are read-only. Now double-click on one of the Word documents. You should see Word open but with Read-Only at the top of the document. This is Outlook maintaining the permissions you set on the items in the folder, even though the Word document is not a default Outlook item type.
Figure 4-5 A user browsing the public folder hierarchy. Since the user does not have permissions to view the Account Tracking folder, the folder does not appear in the hierarchy.
On this tab, you can view the Internet newsgroup name of the public folder. Exchange Server supports exposing public folders as part of an Internet newsgroup hierarchy. For example, we can publish our Outlook Discussion Group as an Internet newsgroup named Comp.MyCompany.Discussions. By doing this, other corporations can receive, as a newsfeed, our threaded discussions in the public folder. On this tab, you can also set whether the public folder should be visible to newsreader clients.
As you learned in Chapter 2, Outlook supports synchronizing folders and forms for offline use. Now let's set up two of our applications to handle offline synchronization:
One of the most requested features of an application that distributes information to many users is the ability to moderate content before it is posted. Moderation allows folder owners to decide which content is appropriate for the application and to select a group of people who can approve the content, and it discourages people from posting random information to the application. By using public folders, you can supply this functionality to your users without having to write any code yourself. The ability to moderate content is a built-in feature of public folders. To show you how moderated public folders work, let's enable moderation for the Outlook Discussion Group application. Take a look at Figure 4-6 as you follow these steps:
NOTE
You can also send a custom response.
Figure 4-6 The Moderated Folder dialog box.
Sometimes the built-in moderation features don't provide you with enough control over the information flowing into your application. So instead of using moderated public folders, you can place custom rules into your application. These rules automatically process new items as they arrive.
More About Moderators and Forwarding ItemsModerators are individual users or distribution lists that are allowed to approve content. When a moderator posts an item to a folder, the item is not forwarded for review. Instead, the item is left in the folder. If the owner of the folder is not listed as a moderator, the item she posts to a folder will be forwarded for review. The owner cannot drag and drop the item back into the folder; Outlook automatically forwards the item for review again until a moderator drags and drops the item back into the folder. If you are going to use a moderated folder, add the folder owners as moderators.
Rules consist of conditions and actions. As you would guess, if the conditions of a rule are met by an item, the associated action occurs. Outlook provides an easy way to create rules through the Folder Assistant. The Folder Assistant, shown in Figure 4-7, allows you to create, edit, delete, enable, disable, and order rules. We will step through an example later in this section.
Figure 4-7 The Outlook Folder Assistant helps you create custom rules for your applications.
The conditions for a rule can range from very simple, such as checking who the item is from, to very complex, such as checking who the item is from and also searching the subject and text for specific phrases or text strings.
The Folder Assistant allows you to specify multiple conditions as well as multiple arguments within a single condition. Multiple arguments in a condition are separated with semicolons. When processing incoming items for a rule, Exchange Server ORs the arguments together. If the item meets one of the arguments, the associated action occurs. One example is to create a single rule that checks whether an incoming item is from multiple people. To do this, you use the From condition and separate each name with a semicolon, such as FROM:Michael Rizzo; Jo Brown. If the item is from either Michael Rizzo or Jo Brown, the action for the rule will occur.
If you specify multiple conditions on different items within a rule, Exchange Server will AND the conditions. All conditions must return true for the action to occur. For example, if you specify the From condition to be FROM:Jo Brown and the Subject condition to be SUBJECT:New sales quote, the item must both be from Jo Brown and have a subject of New sales quote for the action to occur.
You can combine the two techniques to make more complex conditions with multiple arguments. For example, suppose in a discussion database, you set the message Body condition to be BODY:help;problem and the From condition to be FROM:CEO;CIO. If a message is submitted to the folder from either the CEO or CIO and has either help or problem in the message body, your rule's action will occur. My recommendation for the action for this rule is to forward it to the help desk as a high-priority message!
In addition to allowing you to specify simple conditions such as the subject, name of the sender, and name of the intended recipient, the Folder Assistant allows you to set up what are called advanced conditions. Some examples of advanced conditions include size of the item, date ranges, and the presence of attachments. You can even specify advanced conditions that check user-defined fields on forms, folders, and custom office document properties.
One other advanced feature is the ability to create rules that fire when the conditions you specify are not met. For example, you might create a rule that fires for items that are from anyone except John Hand. To do this, you would specify John Hand in the From condition and then specify to only process the rule if the conditions are not met. This type of rule comes in handy when an inclusive condition, such as every user in an address book, is impractical to specify.
Finally, you can set an option in the Folder Assistant that will stop the rules engine from processing any subsequent rules after the current rule fires. You should use this condition when you have multiple rules in your folder and you want the current rule to be the last one applied.
If the conditions of a rule are met, Exchange Server applies the rule's corresponding action to the item. There are four actions you can use in a rule, as shown in Figure 4-8.
Figure 4-8 The Edit Rule dialog box. Notice the four key actions that you can set for your rules.
Following is a description of these actions:
Exchange Server will process multiple rules in the order that they appear in the Folder Assistant, which is from top to bottom. To change the order in which rules are applied, use the Move Up and Move Down buttons to move a rule higher or lower in the list, respectively.
To help you understand how to implement public folder rules, we are going to customize the Account Tracking and Document Library applications with rules we create. For the Account Tracking application, we're going to add a custom reply for the user who submits an item. This reply will state that the folder has received the new item. Follow these steps:
You should see your new rule in the Folder Assistant. Try posting a new message to the Account Tracking application to test your rule.
For the Document Library application, we're going to add an advanced custom rule that will check the Author property of the Microsoft Office document. If the author is not a member of our team, the item will be returned to the sender. To add this rule, follow these steps:
NOTE
On some configurations, the properties do not display when you select the Document option.