ASP has the ability to dynamically output any kind of office application format. Before to start coding, The first thing we need to do is set correct file type. Becase the browser needs to know what to do with the file. Second step is to edit file name. You can use HTML and CSS to create styles in your word ****.
source code :
Code: Select all
<%
Response.ContentType = "application/msword"
Response.AddHeader "Content-Disposition", "attachment;filename=NAME.doc"
response.Write("Dotnetindex.com : <a href=""http://www.dotnetindex.com"">Visit Site</a>
" & vbnewline)
response.Write("<h1>We can use HTML codes for word ****</h1>")
response.Write ("<div style=""padding:4px; font:11px arial"">CSS can be used tooo</span>")
%>