This article was previously published under Q294865
This article has been archived. It is offered "as is" and will no longer be updated.
This article describes how to display a Web page on an Outlook custom form page.
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:
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 You can create a custom form in Outlook that displays a Web page directlyon the form using the Microsoft Web Browser Control. This control is partof the Shdocvw.dll file, which is installed with Microsoft InternetExplorer.
How to Create a Custom Form to Display a Web Page
On the File menu, point to New, and then click Mail Message.
In the message, on the Tools menu, point to Forms and then click Design This Form.
Click the (P.2) page of the form.
On the Form menu, click Control Toolbox.
In the toolbox, right-click a blank area on the Controls page, and then click Additional Controls.
In the Available Controls list, click Microsoft Web Browser Control, and then click OK.
In the toolbox, click the WebBrowser control and drag it to the form page.
In the toolbox, click a CommandButton and drag it to the form page.
On the Form menu, click View Code.
In the Script Editor, type the following code and then close the Script Editor.
Sub CommandButton1_Click() Set MyPage = Item.GetInspector.ModifiedFormPages("P.2") MyPage.WebBrowser1.Navigate("http://www.microsoft.com")End Sub
On the Form menu, click Run This Form to run the form.
Switch to the P.2 page and click CommandButton1 to display the Web page.
For additional information about available resources and answersto commonly asked questions about Microsoft Outlook solutions, click the article number below to view the article in the Microsoft Knowledge Base:
287530 OL2002: Questions About Custom Forms and Outlook Solutions
OfficeKBHowTo OutSol OutSol2002