Discussion:
How to show Excel, Word, PDF in WebBrowser from stream
(too old to reply)
Paul Clement
2004-08-30 19:19:29 UTC
Permalink
On Thu, 26 Aug 2004 14:15:08 -0700, "Walter G" <***@discussions.microsoft.com> wrote:

¤ I have a sql table with a binary field where any kind of document can be
¤ stored.
¤ I'd like to show them using webbrowser (or PrintPreviewControl if possible).
¤ The only way I found was to save the stream as a file and then navigate with
¤ the webbrowser, but when I navigate to an Excel file and then I navigate to
¤ any other file, my system reboots (I tested in other workstations -W2000 and
¤ XP-).
¤ I'd like to load the webbrowser with the stream without having to save it as
¤ a file.
¤ Is there a way to do it? Or show the stream on a PrintPreviewControl or
¤ similar?

See the following:

How To Use the ADODB.Stream Object to Send Binary Files to the Browser through ASP
http://support.microsoft.com/default.aspx?scid=kb;en-us;276488


Paul ~~~ ***@ameritech.net
Microsoft MVP (Visual Basic)
Paul Clement
2004-09-01 16:04:54 UTC
Permalink
On Wed, 1 Sep 2004 06:49:07 -0700, "Walter G" <***@discussions.microsoft.com> wrote:

¤ That's exactly what I need to do, but from VB.Net instead of ASP.Net...
¤
¤

Sorry, I didn't realize you were using the WebBrowser *control*.

AFAIK, the WebBrowser control can only navigate to web pages or directly to documents. If the
document is in a database then it must either be saved to a file first, or, have a web page (such as
ASP page) implement the code in the MS KB article I provided.


Paul ~~~ ***@ameritech.net
Microsoft MVP (Visual Basic)
Paul Clement
2004-09-02 16:47:08 UTC
Permalink
On Wed, 1 Sep 2004 09:47:08 -0700, "Walter G" <***@discussions.microsoft.com> wrote:

¤ Do you know of any other object that I can use for the same purpose?
¤

Only one and it works with a physical file and not a binary stream:

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q311/7/65.asp&NoWebContent=1


Paul ~~~ ***@ameritech.net
Microsoft MVP (Visual Basic)

Loading...