Outlook Today

As you learned at the end of Chapter 7, Outlook 98 includes a feature that takes advantage of the HTML support in Outlook—Outlook Today. Outlook Today allows users to view information in an HTML window, as shown in Figure 8-1, rather than as separate modules. You can also customize Outlook Today's HTML code. For example, a customized Outlook Today page might include hyperlinks to Public Folder favorites, intranet sites, or Internet sites. You can even link to other applications, such as a web-based SQL Server application. You can also create multiple Outlook Today pages for the different types of users of your application. Let's take a look at how the Outlook Today page functions and how you modify the Outlook Today page for your specific application needs.

click to view at full size.

Figure 8-1 Outlook Today is an HTML feature added to Outlook 98. Users can see different types of information in a single window.

Outlook Today Technologies

The standard Outlook Today page takes advantage of a feature in Microsoft Internet Explorer called data binding. Data binding allows Outlook to quickly display the user interface for the Outlook Today page while asynchronously downloading data from the Exchange Server to the Outlook client. Once the data is downloaded, Outlook can modify the data without making additional trips to the server. On the default Outlook Today page, there are three separate data binding tables for your Calendar, Tasks, and Mail. To modify the location of these tables or to add new functionality to the Outlook Today page, you need to know how to modify HTML. Since Outlook Today leverages Internet Explorer, you can even use Dynamic HTML (DHTML) in your customization. However, remember these limitations when customizing the Outlook Today page:

  • Modifying the page might slow performance because Outlook has to retrieve information from other data sources. Try not to build complex applications in the Outlook Today window; instead, build either an Outlook form or a standard HTML application, and then add the HTML application to Outlook Web Access.
  • Although you can add external links to Internet sites on your Outlook Today page, Outlook Today will not verify the security of the site. To use the security capabilities you have in your browser, you could add a link in Outlook Today that launches a separate browser, such as Internet Explorer, to render the page. If you are sure of the content that you are linking to, you do not have to browse the link in a separate browser.
  • You cannot add the Outlook Today page as an Active Desktop item. Currently, the Outlook Today functionality works only when hosted in the Outlook window.

NOTE
The standard Outlook Today pages are hosted in a resource dynamic link library (DLL), which improves the performance of the Outlook Today application. When modifying your Outlook Today pages, you have the option to place your custom HTML pages and images in a resource DLL. However, this book covers only customizing Outlook Today and saving these customizations as HTML files. To learn how to compile your files into a resource DLL for Outlook Today, refer to the Outlook 98 Deployment Kit. The Deployment Kit is presently not available for retail purchase or download from the Web, but you can access the Deployment Kit documentation from http://www.microsoft.com/office/98/outlook/documents/O98DKdoc.htm.

Customizing Outlook Today

Customizing the Outlook Today page and saving the result as an HTML file involves a few steps, which are outlined in the following sections.

Retrieving the Outlook Today Source

To view the source of an HTML page in Internet Explorer, you can right-click on the page and select View Source from the context menu. If you right-click on the Outlook Today page to view the source of the HTML page, however, you will notice that the View Source option is not available—Outlook disables this option. To retrieve the HTML source for the Outlook Today page, you can copy the Outlook.htm file from the Outlook 98 Deployment Kit, or you can use Internet Explorer to retrieve the source by following these steps:

  1. Start Internet Explorer. In the address box, type the following URL, adjusting the path as necessary:
  2.  res://c:\Program Files\Microsoft Office\Office\ Outlwvw.dll/Outlook.htm 

  3. After you press Enter, you will get a script error. Select No to decline continuing running scripts and debugging the current page.
  4. From the View menu, select Source to display the source in Notepad.
  5. From the File menu in Notepad, select Save As and save the file to your hard disk as Outlook.htm.
  6. Perform a search in Notepad for the three instances of display:none, and replace them with display:.

Modifying the Registry

You need to modify your Registry settings so that Outlook knows you want Outlook Today to point to a new file for its functionality. You could write a program that performs this step for your customers:

  1. Start the Registry Editor (Regedit.exe).
  2. Find the following Registry key:
  3.  HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\ Outlook\Today 

    If the Today key does not exist, create it. Right-click on the Outlook key, point to New, and select Key. Type Today for the name of the key.

  4. Add a new string value to the Today key by right-clicking on the Today key, pointing to New, and selecting String Value. Type Url for the value name.
  5. Double-click on the URL string icon to edit it. For its value data, type the path to the Outlook.htm file that you saved previously. For example, file://C:\Outlook.htm. When finished, click OK.

Customizing the HTML File

The final step is to customize the HTML file with your functionality. The easiest way to do this is by using a text editor, because the HTML code in the page contains special formatting that will make the file appear incorrectly in Microsoft FrontPage. Let's review some of the ways you can customize the Outlook Today HTML page.

Changing fonts Since Outlook Today uses cascading style sheets, you can easily change fonts and styles by modifying the style sheet. For example, you could change the font for important items by changing the .itemImportant {color:red} line in the style sheet to the desired font and color.

Adding text, images, and hyperlinks Using HTML, you can add new text, images, or hyperlinks to your Outlook Today page. Remember that if you link to an external web site, Outlook will not implement the security that you set in your standard web browser. So use the following code when placing external links in the Outlook Today page:

 <a style="cursor:hand" class="itemNormal" onclick= "window.open('http://www.microsoft.com/exchange/','_blank');"> Exchange web site</a> 

Adding components Since Outlook Today leverages Internet Explorer, you can place any components on your page as long as Internet Explorer supports them. These components can include ActiveX controls as well as Java applets. However, make sure you trust the source of the component because Outlook does not check the component's security credentials.

Adding script Outlook Today supports both JScript as well as VBScript. From script, you can access the Outlook object library and use its functions in your Outlook Today page. You can see an example of a customized Outlook Today page for the Account Tracking application in Chapter 7.



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

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