B
Benson
I want to write a program to display files (xls, doc,html,pdf,jpg) on
screen. I thought I can use WebBrowser in VB2005 to do this job since those
kinds of files can be displayed in IE.
I try to use the following code, but FAIL:
Dim fs As FileStream
fs = File.OpenRead("D:\doc\joblist.xls")
WebBrowserMsg.DocumentStream = fs
==>> show binary data, not Excel data
I also try:
WebBrowserMsg.Url = New Uri("d:\doc\joblist.xls")
==> seems to work, but with a "save or open dialog box shown" (HOW TO
SUPRESS IT to alwasys open)?
==> Is it right to use this method??
Thanks advance.
Benson.
screen. I thought I can use WebBrowser in VB2005 to do this job since those
kinds of files can be displayed in IE.
I try to use the following code, but FAIL:
Dim fs As FileStream
fs = File.OpenRead("D:\doc\joblist.xls")
WebBrowserMsg.DocumentStream = fs
==>> show binary data, not Excel data
I also try:
WebBrowserMsg.Url = New Uri("d:\doc\joblist.xls")
==> seems to work, but with a "save or open dialog box shown" (HOW TO
SUPRESS IT to alwasys open)?
==> Is it right to use this method??
Thanks advance.
Benson.