Folders


Folders are the focal point of any Outlook application. They hold data, defined views for that data, forms, agents , and rules. They provide users with a storage location for information and a hierarchical structure that makes finding information easy.

In Outlook, you can create folders in three places: in a mailbox stored on an Exchange server, in personal folders stored on your computer's hard disk, and in public folders. Each location 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. You also cannot set permissions on it. (In this book, the examples 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 examples and figures in this chapter assume that you have permission to create public folders. If you right-click on a public folder and can choose New Folder, you have permission to create a subfolder within that folder. 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, I'll describe three simple applications that use the building blocks of 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. In Outlook, select the Folder List shortcut on the Outlook bar. In the Folder List, select the public folder in which you want to create subfolders for the sample application, or select All Public Folders to create the applications in the root of the public folder tree. Then, from the File menu choose New and then Folder. The Create New Folder dialog box will appear.

  2. In the Name box, type a name for the folder. For the threaded discussion application, type Outlook Discussion Group .

  3. Keep the default selection in the Folder Contains drop-down list, which is Mail And Post Items.

    Note  

    Outlook allows you to set the default type of item contained in the folder. When you create a public folder of task items, you select Task Items from the drop-down list, although the folder can hold other types of items besides the default item you select.

  4. Outlook might ask you whether you want to add a shortcut to this folder to your Outlook bar. Click No.

  5. Repeat these steps to create a public folder named Account Tracking and one named Document Library.

Customizing Folder Properties

After creating the folders, you need to customize their properties to fit the needs of your application. Outlook automatically creates and sets certain properties of the folder for you. For example, Outlook defines a default set of views for a folder based on the content type you select when creating the folder. For a calendar folder, Outlook creates 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 then choose Properties. Figure 3-1 shows the Properties dialog box for a folder named Job Candidates.

click to expand
Figure 3-1: The Properties dialog box for a folder named Job Candidates

General Tab

On the General tab of the Properties dialog box, you can modify the general properties of a folder. In addition to specifying the folder name and describing the folder, you can perform 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 option is selected, Outlook automatically creates all views for the folder so 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 (OWA) client or available to your Collaboration 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. Tracking this information can help with planning your local and server disk space requirements.

Administration Tab

The Administration tab of the Properties dialog box allows you to perform common administrative tasks:

  • Set the initial view for the folder     The initial view can be a built-in Outlook view or a custom view. OWA respects this initial view property; when a user browses this folder in OWA, the view you set will be the initial view.

  • Set how Outlook posts 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 will appear exactly as it appears in its original location. The user who drags the item to 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 to 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     You use the Add Folder Address To Contacts button to save a folder's address so you can later preaddress any custom forms that you want Outlook to send to the folder. The administrator can also include the folder in the Global Address List. The folder will appear 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 This Folder Is Available To option is set to All Users With Access Permissions. When you design your application in a folder, you can set this property to Owners Only so 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. If a user tries to submit items to the parent folder while you have it disabled, Outlook will return the items with a note explaining that the folder and its contents are currently available only to owners. After the application is complete, you can reset this option so all users with proper permissions can access the folders.

  • Create rules for the folder     You use the Folder Assistant button to set rules for the folder. These rules can control information flow in a public folder and check specific properties of items as they are submitted to the folder. 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. By using this folder path in your applications and also e-mailing these links, it enables users to quickly open a folder without having to search through the public folder tree.

Forms Tab

On the Forms tab of the Properties dialog box, 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, shown in Figure 3-2. Here you can copy custom forms from other folders or forms libraries into the current folder. You can also update or delete forms.

click to expand
Figure 3-2: The Forms Manager dialog box

Permissions Tab

The Permissions tab of the Properties dialog box, shown in Figure 3-3, allows you to set user and group permissions for your folder and its items so that only the features you want your users to access are exposed. To modify these permissions, you must be an owner of the folder. When you create a folder, Outlook gives you owner rights by default. 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.

click to expand
Figure 3-3: The Permissions tab of a public folder's Properties dialog box

When you first click on the tab, the default role for authenticated 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 users in our division, but we'll enable all users to at least read the information in our Document Library application.

  1. In the folder list, right-click on the Document Library folder you created earlier and choose 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 then 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.) 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 3-4.

    click to expand
    Figure 3-4: Permissions for the Document Library application

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

  • Set the default permissions to None because we do not want anyone in our organization besides sales representatives accessing the application.

  • Set the default permissions for the anonymous user to None because we do not want anyone outside the organization or who is logged on anonymously to access the application.

  • Hide the folder from Default and Anonymous users by deselecting the Folder Visible check box for each of those names. Remember to give your salespeople the Folder Visible permission on the folder ” otherwise , they won't be able to see it either!

Figure 3-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.

click to expand
Figure 3-5: A user browsing the public folder hierarchy
start sidebar
Individual Permissions vs. Roles

Outlook provides roles with associated permissions so you do not have to select each permission individually. If you want to create a custom role, you can select the permissions individually, and Outlook will 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 on to Outlook as a different user. This user will be assigned the default permissions for the folder, which means that all documents in the folder will be 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 indicates that Outlook is maintaining the permissions you set on the items in the folder even though the Word document is not a default Outlook item type.

end sidebar
 

Synchronization Tab

Outlook supports synchronizing folders and forms for offline use. Now let's set up two of our applications to handle offline synchronization:

  1. To enable offline synchronization for public folders, you 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.

  2. To set synchronization, choose Options from the Tools menu, click on the Mail Setup tab, and click the Send/Receive button. Click New to add a new Send/Receive Group. Name the group App Folders and click OK. The Send/Receive Settings dialog for the App Folders group is displayed.

  3. Select the Include The Selected Account In This Group check box.

  4. In the Account Options section, select the Synchronize Forms check box to make sure the most current versions of forms are available off line.

  5. In the Folder Options section, expand the folder tree until you can see the folder shortcuts you created previously in Public Folder Favorites. Select the check boxes for the Document Library folder and the Account Tracking folder. Click OK. Click Close. Click OK.

  6. In your Favorites folder, select the Account Tracking folder. Click the Send/Receive toolbar button. The Account Tracking and Document Library folders should synchronize their contents off line.

Setting Up Moderated Folders

One of the most requested features of applications that distribute 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. It also 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 3-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 choose 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. Select the Set Folder Up As A Moderated Folder option 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. Select the Reply To New Items With option so that every user who mails or posts items in the folder will receive a reply note from Outlook.

  7. Select Standard Response as the response type. Users will receive an e-mail in their Inbox thanking them for their submission and explaining that a pending review by other users might delay the item's availability in the folder. You can also send a custom response if the standard response does not meet your needs.

  8. In the Moderators area, click the Add button to open the Select Additional Moderators dialog box. Select users or distribution lists to be moderators of content placed in the folder, and then click OK.

click to expand
Figure 3-6: The Moderated Folder dialog box
start sidebar
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 ”it 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.

end sidebar
 

Creating Public Folder Rules

Sometimes the built-in moderation features make it a burden to manage all the posts that are flowing into the system. Instead of using moderated public folders, you can design custom rules for your application. These rules automatically process new items as they arrive .

Rules consist of conditions and actions. As you might guess, if the conditions of a rule are met by an item, the associated action occurs. Outlook provides an easy way to create custom rules through the Folder Assistant. The Folder Assistant (shown in Figure 3-7) allows you to create, edit, delete, enable, disable, and order rules. We will step through an example shortly.

click to expand
Figure 3-7: The Outlook Folder Assistant

Setting the Conditions for a Rule

The conditions for a rule can range from very simple ”for example, 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 by semicolons. Exchange Server uses an OR operation on the arguments when processing incoming items for a rule. If the item meets one of the arguments, the associated action occurs. For example, you can create a single rule that checks whether an incoming item is from any of the people you have specified. To do this, you use the From condition and separate each name with a semicolon, as in 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 use an AND operation on the conditions. All conditions must return true for the action to occur. For example, if you specify the From condition as FROM:Jo Brown and the Subject condition as SUBJECT:New sales quote , the item must 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, within a discussion database, you can set the message Body condition to BODY:help;problem and the From condition to 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!

The Folder Assistant also allows you to set up what are called advanced conditions . Examples of advanced conditions include the 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 can create a rule that fires for items that are from anyone except John Hand. To do this, you specify John Hand in the From condition and then specify processing the rule only if the condition is 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 stops the rules engine from processing any subsequent rules after the current rule fires. You can 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 action(s) to the item. Outlook offers four response actions for a rule (as shown in Figure 3-8):

  • Return To Sender     This action sends any item e-mailed to a folder back to the sender. Outlook does not allow the user to post the item. Instead, it returns notification that the user does not have permission to add this item into the folder.

  • Delete     This action deletes the item immediately. By setting this action, you disable other possible actions in the rule, such as Return To Sender, and you automatically enable the Do Not Process Subsequent Rules condition.

  • Reply With     This action sends an automatic reply to the sender. You can customize the reply message by clicking the Template button, which opens a new message form. You can add recipients to the reply, enter custom message text, or insert any attachments that you want to include for the user. To save and close your reply template, choose Save & Close from the File menu.

  • Forward     This action forwards all messages not marked as private to a specified recipient. You can specify the method that Outlook will use to forward the item: Standard, Leave Message Intact, or Insert Message As An Attachment.

click to expand
Figure 3-8: The Edit Rule dialog box

Applying Rules

Exchange Server processes multiple rules in the order that they appear in the Folder Assistant, from top to bottom. To change the order in which rules are applied, use the Move Up or Move Down button to move a rule higher or lower in the list.

Implementing Public Folder Rules

To help you understand how to implement public folder rules, we'll create rules for the Account Tracking and Document Library applications. For the Account Tracking application, we'll add a 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 choose Properties. Don't use the folder from your Favorites, you will have to find the folder in the All Public Folders tree.

  2. On the Administration tab of the Properties dialog box, click the Folder Assistant button.

  3. Click the Add Rule button.

  4. Select the Reply With option.

  5. Click the Template button to display the reply template.

  6. In the reply template, type the following in the Subject field: Your item has been received. In the message body, type 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, choose Save & Close.

  8. Click OK in the Edit Rule dialog box. Outlook will inform 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 appears 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 Microsoft Knowledge Base article 152113 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'll add an advanced rule that checks the Author property of the 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, but use the Document Library folder instead.

  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 are not displayed when you select the Document option. Please see Microsoft Knowledge Base article Q292963 for an explanation of the issue.

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

  4. Select the Only Items That Do Not Match These Conditions option. Click OK.

  5. Select the Return To Sender option.

  6. Click OK three times.




Programming Microsoft Outlook and Microsoft Exchange 2003
Programming MicrosoftВ® OutlookВ® and Microsoft Exchange 2003, Third Edition (Pro-Developer)
ISBN: 0735614644
EAN: 2147483647
Year: 2003
Pages: 227
Authors: Thomas Rizzo

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