日期:2014-05-18  浏览次数:20631 次

如何把HTML转成WORD??(在线等!)

      问题如上!!
 
          知道给点资料``!

------解决方案--------------------
<HTML> <HEAD> <TITLE> HTML转成WORD </TITLE> </HEAD> <body>
<OBJECT id= "FileDialog " style= "LEFT: 0px; TOP: 0px "
codeBase= "http://activex.microsoft.com/controls/vb5/comdlg32.cab "
classid= "clsid:f9043c85-f6f2-101a-a3c9-08002b2f49fb " VIEWASTEXT> </OBJECT>
<SCRIPT language= "JavaScript ">
<!--
function exptWord(obj){

/************{ Mended By Tean Z.Gun }************

Function:
Export HTML as Word file
Ver_2005.09.30
Parameters:
obj: assign the object to export
e.g. exptWord(testObject)

*************{ Mended By Tean Z.Gun }************/

var WordApp;
var Doc;
try{
WordApp = new ActiveXObject( "Word.Application ");
WordApp.Application.Visible=true; // show WORD?

obj.focus();
obj.document.execCommand( "SelectAll ");
obj.document.execCommand( "Copy ");
obj.focus();

Doc=WordApp.Documents.Add();
Doc.Activate();
Doc.Content.Paste();
Doc.Activate();
WordApp.DisplayAlerts=false;

try{ // maybe not saved
Doc.Close();
}catch(e){};

WordApp.DisplayAlerts=true;
WordApp.Quit();
return;
}catch(e){ // maybe automation not permitted
alert( "Cancled ")
}
}
//-->
</SCRIPT>
<div id= "exptMe " contentEditable= "true "
style= "width:400;height:200;border:1px solid black "> Here is the
content to be Exported </div>
<input name= "button " type= "button " onClick= "exptWord(exptMe) "
value= "Export WORD ">
</body> </HTML>

------解决方案--------------------
到孟子的网站上搜一下.

------解决方案--------------------
http://topic.csdn.net/t/20051109/22/4383200.html
我觉得暂时没有HTML直接到WORD方法,可不可以,先新建一个WORD文件,再把HTML的摸版放入这个WORD中,然后保存!
C#操作WORD的方法网上有许多