How to save html as doc

G

Guest

When I serve an html document from our webserver, I set it to open up in
word, which works fine by setting the response type as

String filename = "myDocument.doc";
response.setContentType("application/vnd.ms-word");

The html file opens in word with the title myDocument.doc. The problem is,
when I click save as, it defaults to html, not doc type. Is there anyway to
make it default to doc, not html.

One more thing, in the html version of the document, the tables have a
border of 0, and therefore do not sure up to the user, but when you open up
the html in word, the borders are a slight gray, is there anyway to make them
invisible as well.

Thank you
 
A

Anne Troy

I can only answer the second question. Viewing table gridlines is an option
the user has on their machine. You cannot easily control this option, nor
can you control it absolutely.
****************************
Hope it helps!
Anne Troy
www.OfficeArticles.com
****************************
 

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

Top