Office安装后自带的vba帮助非常的全!看看吧。
\Program Files\Microsoft Office\Office\2052

解决方案 »

  1.   

    <textarea id="txt">sdfdsa
    dsaf
    fsdaf
    sdf
    sadfadsf
    dsaf</textarea>
    <script type="text/vbs">
    str=replace(txt.value,chr(10),"<br>")
    </script>
    <script language="JavaScript">
    <!--var printWindow=window.open("","PrintWindow","width=10,height=10,left=10000,top=10000");
    printWindow.document.write (str);
    printWindow.location.reload();
    printWindow.document.execCommand ("selectall");
    printWindow.document.execCommand ("copy");var wApp = new ActiveXObject("Word.Application");
    wApp.visible = true ;
    wApp.Documents.add();
    wApp.Selection.PasteSpecial();
    wApp.Options.DisplayGridLines =false;//-->
    </script>------------
    这样呢?