Creative Ways to Use the Microsoft Outlook 2000 Folder Home Page URL

Jim Groves
Microsoft Corporation

Applies To: Microsoft® Outlook® 2000

October 1999

Summary: You can use the folder home page URL to do things besides displaying a Web page. In fact, you can use it to do just about anything that a URL lets you do. This article provides a handful of ideas to help you appreciate the breadth of possibilities that this feature provides. (4 printed pages)

Introduction

By now you are no doubt familiar with how Microsoft® Outlook® 2000 can display a Web page when you open a particular folder. Application developers can use this to provide a Web-style, user-friendly interface for their folder-based applications. In fact, one way to implement the much-touted "digital dashboard" is a souped-up Web page displayed as an Outlook folder home page.

You may not be aware that you can use the folder home page URL to do other things besides displaying a Web page. In fact, you can use it to do just about anything that a URL lets you do. This article provides a handful of ideas to help you appreciate the breadth of possibilities that this feature provides.

Scenario 1: Install ActiveX Controls

Custom Outlook forms can host Microsoft ActiveX® controls. However, they do not provide a mechanism for automatically installing a control if it is not already present on a user's computer.

Consider the case of a corporation's application developer who has created a public folder-based application for ordering office supplies in-house. She has published a number of forms in the folder's forms library, and these forms rely on custom ActiveX controls. Because potentially anyone in the company could use this application, but in fact only a small percentage (mostly secretaries and administrative assistants) will actually do so, she doesn't want to force every potential user to install the required controls before using the application. However, she wants to make sure the controls are already installed before a user tries to open the forms that rely on them.

She can use the Microsoft Outlook 2000 folder home page URL to solve this problem. All she needs to do is to create a simple program file that installs the controls if they are not already present on the user's computer. She then places the program file in a location that can be addressed by a URL and sets the folder home page URL to point to the program file. Then, whenever a user opens the public folder, the program file runs, checks to see if the controls are present, and runs the required control's setup program if necessary. If the controls are present, the program file closes immediately, and chances are the user who opens the public folder will not even be aware that anything out of the ordinary occurred.

Scenario 2: Create a Summary Document

Outlook's folder views provide a very powerful and flexible way to see an overview of the contents of a folder. However, they do suffer some limitations. For example, there is no way to programmatically control the view or how it is printed, or to save the contents of the view to a file.

One way to work around this limitation is to use Automation to extract information from the items in a folder and place the data in a Microsoft Excel spreadsheet, for example. The user can then save the spreadsheet, or use the Excel PivotTable® feature to look at the information in a number of different ways.

For example, a company uses an Outlook-based system to track sales orders. Whenever a sales representative submits an order, a copy is forwarded to the representative's manager. After the manager reviews the order, she moves it to a folder in her private mailbox. The home page URL of this folder points to an Excel spreadsheet that contains macros that, when the spreadsheet opens, step through the items in the folder, extract relevant information from each item's fields, and then place that information in the cells of the spreadsheet. The manager can then use the spreadsheet to construct a status report to send to her own manager.

Scenario 3: Display a Message

One of the more common questions Microsoft Product Support Services receives about Outlook is, "How can I display a message whenever a user opens a public folder?" Before Outlook 2000, this was very difficult to do; now it's easy if you use a folder home page URL.

Take, for example, a company that maintains a USENET newsgroup to provide a place for customers to discuss the company's products. To make it easier for employees to access the information in the newsgroup, the newsgroup is replicated to an Exchange Server public folder. Responses posted by employees to the public server are then "pushed back" to the USENET newsgroup.

Because it is not readily apparent that the public folder is more "public" than usual, the company wants to warn users when they open the public folder that anything they post in the public folder will be published on the Internet as well. In fact, for legal reasons, they would like to present a "terms of usage" agreement that the user would be required to agree to before proceeding on to the public folder.

The company can achieve this by setting the public folder's home page URL to point to a program file. This program file could be designed to display the terms-of-usage agreement and ask the user to click a button to indicate whether the user agrees to be bound by its terms. If the user agrees to the terms, the time and the user's name are recorded in a log; if the user refuses to be bound by the terms, the program file uses Automation to redirect the user's active explorer to a different folder, as shown in the following example.

Sub NoButton_Click()
    Dim objOlApp As New Outlook.Application
    Dim objExpl As Outlook.Explorer
    Dim objNS As Outlook.NameSpace
    Dim objFold As Outlook.MAPIFolder

    Set objExpl = objOlApp.ActiveExplorer
    Set objNS = objOlApp.GetNamespace("MAPI")
    Set objFold = objNS.GetDefaultFolder(olFolderInbox)
    Set objExpl.CurrentFolder = objFold
    Set objOlApp = Nothing
    Set objExpl = Nothing
    Set objNS = Nothing
    Set objFold = Nothing
End Sub

Scenario 4: Show a Web Page in a Browser

The Outlook folder home page is a great way to present Web-based information to your users, but only if the Web page is an acceptable replacement for the default folder view. If it isn't, then displaying the Web page just prevents users from being able to access the folder's contents. (In fact, that might be another way to use the folder home page!)

But what if, for example, you want to display a Web page when a user opens a folder, without replacing the Outlook view for the folder, so that you can provide instructions for using the folder? You can do this by setting the folder's home page URL to point to a batch (.bat or .cmd) file that opens the Web page. For example, a batch file that contains the following line would display the Microsoft Corporation home page in a separate browser:

START http://www.microsoft.com/

Scenario 5: Open a USENET Newsgroup

You cannot use Outlook alone to access USENET newsgroups on the Internet. However, you can configure Outlook to be your default newsgroup manager. When Outlook is your newsgroup manager, it displays the newsgroups by using Microsoft Outlook Express, a required support component of Outlook.

Using Outlook to view a newsgroup is not necessarily easy, however. Although you can enter the URL of a newsgroup in Outlook's Web toolbar, you cannot create a shortcut to a newsgroup in the Outlook bar. But you can still provide one-click access to a newsgroup in Outlook by setting the home page URL of a public folder to the newsgroup's URL (such as news:microsoft.public.outlook) and then adding a shortcut to the public folder on the Outlook bar. When you click the shortcut, not only will the public folder open, but you will also gain access to the corresponding newsgroup.

Conclusion

As you can see, there are many ways you can take advantage of Outlook's folder home page feature without actually making a folder home page. This article is intended to suggest only a few of the ways in which you can creatively exploit this feature. Because most URL types can be used as a folder home page URL, the possibilities are almost limitless. Perhaps the next time you find yourself wishing Outlook could do something, you might be able to find a solution by using a folder home page URL in a new and imaginative way!

See also "Extending Microsoft Outlook 2000" for a description of the folder home page.