Download into MS Word document including images



Hello world,

I have an ASP.NET application that returns HTML to the browser that
should be read by MS Word.
To do this I set

Response.ContentType = ContentType.Word
Response.AddHeader("Content-Disposition", "Report.doc")

and render the HTML.
The browser (IE6.0) shows a dialog box which enables the user to Open
the HTML in Word or save the report to disk.

So far so good.

But now I want to include a number of images into the Word document.
These images are created on the fly during the generation of the HTML
(so they are not available in a file on the webserver. In fact, for
each image I've got an System.IO.Stream representing the image).

I know that there is something like

<img src="data:image/gif;base64,iVBORw0KG....."; >

to include the image itself in the HTML. This construction is
understood by Firefox, but not by IE or MS Word.

So I think I should download the images as seperate files. A
subdirectory
in de Temporary Internet Files should be created, the images should be
saved in this subdirectory and the HTML should refer to those images,
for example <img src="MyDir\MyImageFile.jgp">.

Does anyone know how to do this or have any other suggestion?

Thanks in advance,
Gerard

.



Relevant Pages

  • Re: How can I hyperlink to an enlarged picture in Publisher 2003?
    ... The Back to top links are needed on the FAQ, Adornments, and Glass art pages. ... I was referencing the way you produce your html ... One of the places where Publisher starts to feel its limits is when the ... When you resize and optimize your images, ...
    (microsoft.public.publisher.webdesign)
  • Re: FireFox bugged isolated
    ... >> Some HTML code that doesn't display correctly on a browser can be ... but if it crashes the browser it's a problem with ... It's a problem with FireFox, not eBay, no HTML should be ...
    (uk.people.consumers.ebay)
  • Re: How can I hyperlink to an enlarged picture in Publisher 2003?
    ... server will let me use Publisher; I had intended to change it to HTML & FPage ... When you resize and optimize your images, ... on the photo. ...
    (microsoft.public.publisher.webdesign)
  • Re: Div rendering
    ... In IE it renders like 3 images in one row where as in Firefox it renders 3 images in 3 seperate lines.... ... browser to adjusts the rows and columns automatically...IE does it for me automatically but firefox not....Is the HTML syntax correct... ...
    (microsoft.public.scripting.jscript)
  • Re: How can I hyperlink to an enlarged picture in Publisher 2003?
    ... Think I understand what you're saying about the upload. ... I was referencing the way you produce your html ... One of the places where Publisher starts to feel its limits is when the ... When you resize and optimize your images, ...
    (microsoft.public.publisher.webdesign)