ASP将当前页导出为Word文档的代码
HTML代码
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
xmlns="http://www.w3.org/TR/REC-html40">
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
ASP代码
document="doc文档的名字"
Filename = document&".doc"
Response.ContentType = "application/vnd.ms-word"
Response.AddHeader "content-disposition", "attachment; filename=" & filename
放在页面最前,亲测可用