Folders

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.

Creating Public Folders

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:

  1. From the File menu in Outlook 98, select New and then Folder. The Create New Folder dialog box appears.
  2. In the Name box, type a name for the folder. Start with the threaded discussion application, and type Outlook Discussion Group.
  3. The drop-down list named Folder Contains shows possible items. Keep the default, which is Mail Items.

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.

  1. In the Select Where To Place The Folder box, expand the Public Folders tree, select All Public Folders, and then click OK.
  2. Outlook might prompt you about whether you want to add a shortcut to this folder to your Outlook bar. Click No.
  3. Repeat these steps to create an Account Tracking public folder and a Document Library public folder.

Customizing Folder Properties

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.

General Tab

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:

  • Specify the default form for posting items to the folder. You can set which default or custom form a user should use when submitting an item to the folder. As you will see with our sample applications, you'll want to modify this property after you develop custom forms for the folder.
  • Automatically generate Outlook views for users of the Exchange client. When the Automatically Generate Microsoft Exchange Views check box is checked, Outlook automatically generates all views for the folder so that users on the Exchange client can use them. This property must be set if you want your custom Outlook views to be available in the Outlook Web Access client or to your Collaborative Data Objects (CDO) applications. By default, Outlook enables this property.
  • Check the size of the folder. Click the Folder Size button to check how much space the folder is using to store its items and any subfolders. This option can help you figure out which folders are being used most frequently by users.

Administration Tab

The folder's Administration tab enables you to perform common administrative tasks. The following sections describe them.

  • Set the initial view for the folder. The initial view can be either a built-in Outlook view or a custom view. Outlook Web Access respects this initial view property; when a user browses this folder in Outlook Web Access, the view you set will be the initial view.
  • Set how Outlook formats items dragged into your folder. The Drag/Drop Posting drop-down list has two settings: Move/Copy and Forward. Move/Copy specifies that when an item is dragged into the folder, the item appears exactly as it appears in its original location. The user who drags the item into the folder is not indicated, and the person who originally posted the item is retained as the owner of the item. The Forward setting, in contrast, identifies the user who dragged the item into the folder as the user who forwarded the item. Outlook modifies the original text of the item to indicate that the item was forwarded.
  • Save the folder address to your personal address book. Use the Add Folder Address To Personal Address Book button to save a folder's address so that you can later preaddress any custom forms that you want Outlook to automatically send to the folder. The administrator can also expose the folder in the Global Address List. Once this is done, the folder appears as just another recipient, which you can select in the address fields on your form.
  • Set the current availability of the folder. By default, the option This Folder Is Available To is set to All Users With Access Permissions. While designing your application in a folder, you can set this property to Owners Only so that users cannot access the folder. This property affects only the current folder, so users still can access and continue working with subfolders under the parent folder. When a user tries to submit items to the parent folder while you have it disabled, Outlook returns the items with a note explaining that the folder and its contents are available only to owners at this time. After the application is done, you can reset this option so that all users can access the folders as long as they have proper permission.
  • Create rules for the folder. The Folder Assistant button allows you to set rules for the folder. Because these rules can control information flow in a public folder and check specific properties of items as they are submitted into the folder, the Folder Assistant is important to designers of applications. For more information on designing rules, see the section titled "Creating Public Folder Rules" later in this chapter.
  • Moderate folder content. The Moderated Folder button gives you access to settings that automatically moderate all the content in a folder before a user can post information. You can enable moderation on any public folder. For information on how to set up a moderated folder, see the section titled "Setting Up Moderated Folders" later in this chapter.
  • Show the folder path. The Folder Path text box shows the location of the folder in the public folder hierarchy. Remember this property when you are designing an application, because it enables users to quickly open a folder without having to search through the public folder tree.

Forms Tab

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.

click to view at full size.

Figure 4-2 The Forms Manager dialog box allows you to modify forms associated with the current folder.

Permissions Tab

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.

  1. In the folder list, right-click on the Document Library folder you created earlier and select Properties.
  2. Click on the Permissions tab.
  3. In the Name box, select Default. In the Permissions area, select Reviewer from the Roles drop-down list.
  4. Click Add, and select several coworkers from the address list in the Add Users dialog box. (Outlook also allows you to select and assign permissions to distribution lists. This capability makes it easier to set permissions for a large number of users.) When finished, click OK.
  5. In the Name box, select one of the names you added in the preceding step. In the Roles drop-down list, select Publishing Author. This role will allow your coworkers to create, read, and edit their own items in the folder. Your Permissions tab should look similar to Figure 4-4.

Follow the same steps for the Account Tracking application, with these exceptions:

  • Set the default permissions to None since we do not want anyone in our organization besides sales representatives accessing the application.
  • Hide the folder from Default users by unchecking the Folder Visible check box. Remember to give your salespeople permission on the folder or they won't be able to see it either!

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 Roles

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

click to view at full size.

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.

Internet News Tab

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.

Synchronization Tab

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:

  1. Enable Outlook for offline access. From the Tools menu, select Options. Click on the Mail Services tab. Check the Enable Offline Access check box, and click OK.
  2. To enable offline synchronization for public folders, add the folders to your public folder favorites. Open the folder list in Outlook. Expand the Public Folders tree to display Favorites and All Public Folders. Drag and drop the Document Library folder and the Account Tracking folder into the Favorites folder. Both folders should appear in your Favorites folder.
  3. Open the Favorites folder. Right-click on the Document Library folder and select Properties.
  4. Click on the Synchronization tab, and select the When Offline Or Online option.
  5. Click OK.
  6. Repeat Steps 3 through 5 for the Account Tracking folder. Now both of these folders are set for offline synchronization. Later in this chapter, we will use the Filter option in Outlook to select the items to synchronize, based on specific criteria, from the server to our client.

Setting Up Moderated Folders

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:

  1. Find the Outlook Discussion Group folder you created in the public folder list, right-click on it, and select Properties.
  2. In the Properties dialog box, click on the Administration tab.
  3. Click the Moderated Folder button to open the Moderated Folder dialog box.
  4. Check the Set Folder Up As A Moderated Folder check box to make the discussion folder a moderated folder.
  5. In the Forward New Items To box, either type the names of people who are moderators or enter the address of another public folder to which Outlook should forward the items.
  6. Check the Reply To New Items With check box. By enabling this option, every user who mails or posts items in the folder will receive a reply note from Outlook.
  7. Choose Standard Response as the response type. Users automatically will receive an e-mail in their Inbox thanking them for their submission and explaining that there might be a delay before the item is available in the folder due to a pending review by other users.

NOTE
You can also send a custom response.

  1. In the Moderators area, click the Add button. Select users or distribution lists to be moderators of the content placed in the folder. Figure 4-6 shows a sample Moderated Folder dialog box. When finished, click OK.
  2. click to view at full size.

    Figure 4-6 The Moderated Folder dialog box.

Creating Public Folder Rules

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 Items

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

click to view at full size.

Figure 4-7 The Outlook Folder Assistant helps you create custom rules for your applications.

Setting the Conditions for a Rule

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.

Setting the Actions for a Rule

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.

click to view at full size.

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:

Applying Rules

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.

Implementing Public Folder Rules

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:

  1. Find the Account Tracking folder in the folder list, right-click on it, and select Properties from the context menu.
  2. On the Administration tab, click the Folder Assistant button.
  3. Click the Add Rule button. The Edit Rule dialog box appears.
  4. Check the Reply With check box.
  5. Click the Template button to display the reply template.
  6. In the reply template, type this in the Subject field: Your item has been received. In the message body, enter Thank you for submitting your item to the Account Tracking application. Your item should be available immediately for other people in the organization to use.
  7. From the File menu, select Save & Close.
  8. Click OK in the Edit Rule dialog box. Outlook prompts you that this rule will fire for all incoming messages. Click Yes.
  9. Click OK in the Folder Assistant dialog box. (If a message box is displayed indicating that you do not have Send As permission, check with your Exchange Server administrator to ensure that you have Send As permission on the public Account Tracking folder. See Knowledge Base article Q152113 for more information.)

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:

  1. Follow steps 1 through 3 from the preceding procedure for the Document Library folder.
  2. In the Edit Rule dialog box, click the Advanced button. In the Show Properties Of area, select the Document option.

NOTE
On some configurations, the properties do not display when you select the Document option.

  1. Enable the Author property in the Show Properties Of section. For the values, type the names of people on your team; separate the names with semicolons.
  2. Enable the Only Items That Do Not Match These Conditions check box. Click OK.
  3. Enable the Return To Sender check box.
  4. Click OK three times.


Programming Microsoft Outlook and Microsoft Exchange
Programming Microsoft Outlook and Microsoft Exchange, Second Edition (DV-MPS Programming)
ISBN: 0735610193
EAN: 2147483647
Year: 1999
Pages: 101
Authors: Microsoft Press, Thomas Rizzo
BUY ON AMAZON

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net