Using the WebBrowser Control to Display MS-Office Documents


The following sample application is included when you purchase the Visual Basic 6 Tutorial Download Package or the Visual Basic 6 "Extra" Sample Applications from The VB Programmer.


Although the WebBrowser control is typically used to display web pages from the Internet, the WebBrowser control can also be used to display MS-Office files. The screen shots below show the sample application as it displays an Excel spreadsheet, Word document, and PowerPoint presentation, respectively, in the browser. Note also that there is a "sidebar" navigator on the left that enables the user to select which document to display. (This sidebar is a ListView control, in Large Icon view, embedded in a PictureBox.)