Article ID: 181267 - Last Review: February 27, 2004 - Revision: 1.2

OL98: How to Display a Web Page in an Outlook Form

This article was previously published under Q181267

On This Page

Expand all | Collapse all

SUMMARY

This article describes how to display a Web page on a Microsoft Outlook 98 custom form page.

MORE INFORMATION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs.
If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites:

Microsoft Certified Partners - https://partner.microsoft.com/global/30000104 (https://partner.microsoft.com/global/30000104)

Microsoft Advisory Services - http://support.microsoft.com/gp/advisoryservice (http://support.microsoft.com/gp/advisoryservice)

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site: http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms) You can create a custom form in Outlook that displays a Web page directly on the form using the Microsoft Web Browser Control. This control is part of the Shdocvw.dll file, which is installed with Microsoft Internet Explorer.

WARNING: The Web Browser Control used to display the form must be from the same version or a newer version of the Shdocvw.dll file as that used to create the form. For instance, if the custom form is created using the Shdocvw.dll file from Microsoft Internet Explorer version 3.x, you can display it on a computer using either Microsoft Internet Explorer 3.x or 4.0. However, the reverse will not work. If the custom form is created using a Shdocvw.dll file from Microsoft Internet Explorer 4.0, you cannot display it on a computer using Microsoft Internet Explorer 3.x. In this event, you will receive the following error message when you try to display the Web page:
Could not load an object because it is not available on this machine.
If you want to create a form that can be used with multiple versions of Microsoft Internet Explorer, create the form on a computer that uses the older version.

How to Create a Custom Form to Display a Web Page

  1. On the File menu, point to New, and then click Mail Message.
  2. In the message window, point to Forms on the Tools menu, and then click Design This Form.
  3. Click the (P.2) page of the form.
  4. On the Form menu, click Control Toolbox.
  5. In the Toolbox, right-click a blank area on the Controls page, and then click Custom Controls.
  6. In the Available Controls list, click Microsoft Web Browser Control, and then click OK.
  7. In the Toolbox, click the WebBrowser and drag it to the form page.
  8. In the Toolbox, click the CommandButton and drag it to the form page.
  9. On the Form menu, click View Code.
  10. In the Script Editor, type the following code:
        Sub CommandButton1_Click()
              Set MyPage = Item.GetInspector.ModifiedFormPages("P.2")
              MyPage.WebBrowser1.Navigate("http://www.microsoft.com")
           End Sub
    						
  11. Close Script Editor.
  12. On the Form menu, click Run This Form to start run mode.
  13. Switch to the P.2 page, and click CommandButton1 to display the Web page.

REFERENCES

For more information about creating solutions with Microsoft Outlook 98, please see the following articles in the Microsoft Knowledge Base:
180826  (http://support.microsoft.com/kb/180826/EN-US/ ) OL98: Resources for Custom Forms and Programming
182349  (http://support.microsoft.com/kb/182349/EN-US/ ) OL98: Questions About Custom Forms and Outlook Solutions

APPLIES TO
  • Microsoft Outlook 98 Standard Edition
Keywords: 
kbdtacode kbhowto kbprogramming KB181267
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations