473,386 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

Dec 15 '05 #1
0 1205

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: lawrence | last post by:
Under the domain publicpen.com I've several dozen sites in subdiretories, such as www.publicpen.com/honenbeger. I've no trouble with any of these sites. But under one, which I put in yesterday,...
0
by: kc | last post by:
I'm using a Repeater to display a series of lines, each containing a date and two images, one for Word and the other for PDF. Both images display their respective documents, in new windows, when...
0
by: John Wallace | last post by:
Hi, This could well be very difficult, but anyway... A client user prepares an MS Word (2000+) document, including text and images and then (somehow) submits all or part of that document (via...
3
by: gowens | last post by:
I have an ASP.Net multi-part tabbed page. One of the tab pages contains several controls (including a DataList). The DataList contains, virtually-rendered, Database images and some text fields....
2
by: gerard.buskermolen | last post by:
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 and render the HTML. The...
0
by: R1gg4 | last post by:
Hi all, I currently have a VB.NET application that interfaces with Word 2003 to produce documents from templates substituting the data in the template to form the document. This is all working...
8
by: CM | last post by:
Hi, Could anyone please help me? I am completing my Master's Degree and need to reproduce a Webpage in Word. Aspects of the page are lost and some of the text goes. I would really appreciate it....
0
by: robwahl | last post by:
Hi, I have a members only area of a site (using ASP and MS Access) where I need users to be able to either view or download reports (PDF or MS Word doc - doesn't matter which). I want to store...
0
by: talk2pk | last post by:
When i am writing the images to the word file(using Clipboard.SetImage) and open another word doc, the process of writing those images migrates to the new opened document. Can anybody suggest why...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.