你把html 表单读到文本文件里,然后将扩展名改成doc就可以拉!

解决方案 »

  1.   

    我正在想相反的方向
    怎么把richtext转换成html
      

  2.   

    直接用word打开,然后存成.doc文件就可以了。protected void ConvertToHtml(string SrcFilePath,string TargetFilePath)
    {
      Word.Application app=new Word.Application();
      app.Visible=false;
      Object o=Missing.Value;
      object docFile=SrcFilePath;
      _Document doc=app.Documents.Open(ref docFile,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o);
      object fileName=TargetFilePath;
      object format=Word.WdSaveFormat.wdFormatDocument; //word format
      doc.SaveAs(ref fileName,ref format,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o);
      object t=true;
      app.Quit(ref t,ref o,ref o);
    }
      

  3.   

    感谢大家 非常感谢 athossmth(athos)  
    可问题没有解决
    怎么保存到客户端呢问题
    服务器不装word 的话 怎么再客户端实现 谢谢