HomeASP HostingWeb DesignRegister DomainSupportAbout Us

FAQ
Support :: FAQ


How to export your ASP page to a Word document
There is a way to direct the html produced from an ASP page to Word document instead of displaying it in standard browser and in order to do that you have to change the content type of the server response.

Put the following line on the top of your ASP page:
<%
Response.ContentType = "application/vnd.ms-word"
%>

When you access this ASP page from your browser a Word document will be opened inside of the browser and all the content generated by the ASP page will appear in this document. You can modify and save this Word document as any other Word file. The following example will output a simple html inside of Word document:

<%
Response.Buffer = True
Response.ContentType = "application/vnd.ms-word"
Response.AddHeader "content-disposition", "inline; filename = ASP_Word_Doc.doc"
%>
© Copyright 2001-2004 Art Branch Inc.