Hello all,

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have developed a web application, and I want to export a specific page to a
Word document. I have used
Response.ContentType = "application/msword";
Response.AddHeader("content-disposition", "inline; filename=myfile.doc");

and it seems to be working just fine. However the problem is that the page
also contains images, that are exported as references to the actual location
of the files on the server, and are not embedded in the document. Therefore,
if I open the document on another computer that does not have network access
the images are not there!
How can I export the page to a word document with the images embedded in the
..doc file?

Thanks in advance
 
Nikos said:
I have developed a web application, and I want to export a specific page to a
Word document. I have used
Response.ContentType = "application/msword";
Response.AddHeader("content-disposition", "inline; filename=myfile.doc");

and it seems to be working just fine. However the problem is that the page
also contains images, that are exported as references to the actual location
of the files on the server, and are not embedded in the document. Therefore,
if I open the document on another computer that does not have network access
the images are not there!
How can I export the page to a word document with the images embedded in the
.doc file?

Thanks in advance

Just a note: if I understand correctly, you are sending a "plain" html
document, with special headers to trick the browser into opening Word to
display it. Word then knows how to translate the supplied html.
So you are not "exporting as Word".
 
That's right. Actually, the .aspx page is dynamically created with database
content, based on a search function. It is a web page which is used for
viewing and in case someone wants to store the data he can "export" it to a
..doc file. I do this by having a "duplicate" page with the only difference
being the headers redirecting it to word.
But the only problem is that the images are not stored in the document.

If you have either a suggestion on how to actually export it to word, or a
way to store the images on the page created in word I would appreciate either.

Thank you very much!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top