Outlook Today

[Previous] [Next]

As you learned at the end of Chapter 6, Outlook 98 and Outlook 2000 include 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 7-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 Microsoft 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 7-1. Outlook Today is an HTML feature that was added in 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 (that is, the computer running 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, one each 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, 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, visit http://www.microsoft.com/office/ork/.

Outlook Today in Outlook 2000

There are some differences between the Outlook Today page in Outlook 2000 and the Outlook Today page in previous versions of Outlook. In this section, we'll look at the most significant changes made to Outlook Today in Outlook 2000.

User Interface Changes

One of the major differences in the new version of Outlook Today is the user interface. In Outlook 2000, the ability to change both the folders that are listed and the style of the Outlook Today page is integrated directly into the user interface. Figure 7-2 shows the new interface for the Outlook Today page, and Figure 7-3 shows the Customize Outlook Today page.

click to view at full size.

Figure 7-2. The new interface for Outlook Today in Outlook 2000.

click to view at full size.

Figure 7-3. The customization page for Outlook Today in Outlook 2000.

Security Changes

The new Outlook Today page has two security changes from previous versions. First, browsing security is disabled for the default Outlook Today page. When the user clicks on links or navigates to other pages, the browser turns on security for those pages. Therefore, you need to make sure that the controls or scripts you use in your default Outlook Today page are secure. However, you also need to make sure any links to which the user tries to navigate are not affected by the browser security being on.

Second, if the default page is a frameset, browser security is disabled when the parent frame is the page displayed in Outlook Today. This means security will not be enabled when a user makes any changes to or performs any navigation in child frames. Security will be enabled only when the user changes the parent frame to navigate to a different location. For this reason, you should force the links in the child frames of a frameset to open in the parent frame.

Browser Issues

Since the new version of Outlook Today implements a subset of Internet Explorer technology, there are two browser issues that you should be aware of. First, the frameset or Iframe HTML elements might not work as you expect. For example, when you set the target to be a blank frame, the new window will open in Outlook rather than in a separate Web browser. Second, you might find that HTML forms or tabular data controls do not work correctly.

To remedy these problems, you will have to modify Outlook Today to use a full version of Internet Explorer. Note that when you make this change you will lose the performance enhancements of Outlook Today, such as the <RENSTATICTABLE> elements. To modify Outlook Today to use the full Internet Explorer version, add two settings to the registry in the following location:

 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Outlook\Webview\mailbox] "url"="http://YOURLOCATION/default.htm" "navigation"="yes" 

You also can make this change programmatically on a folder-by-folder basis by setting the WebViewAllowNavigation property to True on the MAPIFolder object that represents the folder. By default, folder home pages, which you'll learn about later in the chapter, use the full version of Internet Explorer to display content.

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 use Internet Explorer. Follow the steps listed below.

  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\1033\Outlwvw.dll/Outlook.htm

NOTE
The 1033 in the path above specifies the locale for your language. If you are using a version of Microsoft Office with a language other than English, you'll need to change the 1033 to the correct value for your language.

  1. After you press Enter, you will get a script error. Select No to decline continuing running scripts and debugging the current page.
  2. From the View menu, select Source to display the source in Notepad.
  3. From the File menu in Notepad, select Save As and save the file to your hard disk as Outlook.htm.
  4. 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. 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\9.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. 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 uses 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 Microsoft Visual Basic Scripting Edition (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 6.

Using the Outlook Databinding controls

The Databinding controls provided in Outlook can quickly bind and display information contained in Outlook folders. The Databinding control places the information dynamically bound from Outlook data into the sections of the Outlook Today HTML page designated by the RENSTATICTABLE elements. You can point these controls at public folders rather than at default folders such as Calendar or Tasks. We'll look at the Databinding control in detail in Chapter 11, when we discuss the Digital Dashboard.



Programming Microsoft Outlook and Microsoft Exchange
Programming Microsoft Outlook and Microsoft Exchange, Second Edition (DV-MPS Programming)
ISBN: 0735610193
EAN: 2147483647
Year: 2000
Pages: 184

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