现在有一个word文档.doc,怎样用asp.net(c#)将其转换为.htm或者.html网页文档格式(包括图片等)?请大家帮忙!谢谢啊!!

解决方案 »

  1.   

    其实转成Htm文件会变大不说,很多功能都失去了,如果不是必需则不必转成Htm请问楼主为什么要转?
      

  2.   

    用ie應該可以直接看.doc文檔的...
      

  3.   

    我顺便问一下, 怎样将 纯文本 变成有 字体格式和.doc文档?
      

  4.   

    private void WordLoadData() 

    Word.Document wDoc=null; 
    Word.Application wApp=null; 
    sysFun.CreateWordDocument("E:\\监测报告(new).dot",ref wDoc,ref wApp); //对标签"C"进行填充 
    object bkmC="C"; 
    if(wApp.ActiveDocument.Books.Exists("C") == true) 

    wApp.ActiveDocument.Books.get_Item 
    (ref bkmC).Select(); 

    wApp.Selection.TypeText(this.txt1.Text); 
    object bkmG = "TWaterTable3"; 
    object unit;  
    object count; //移动数 
    object extend;  
    extend = Word.WdMovementType.wdExtend; 
    unit = Word.WdUnits.wdCell; 
    //把DataGrid中数据填充到标签TWaterTable3上 
    if(wApp.ActiveDocument.Books.Exists("TWaterTable3") == true) 

    wApp.ActiveDocument.Books.get_Item 
    (ref bkmG).Select(); for(int i=0;i { 
    if(i==0) 

    count=1; 

    else 

    count=0; 

    //需填充5列数据 
    wApp.Selection.Move(ref unit,ref count); 
    wApp.Selection.TypeText(gridEX1.GetRow(i).Cells[0].Text); 
    count=1; wApp.Selection.Move(ref unit,ref count); 
    wApp.Selection.TypeText(gridEX1.GetRow(i).Cells[1].Text); wApp.Selection.Move(ref unit,ref count); 
    wApp.Selection.TypeText(gridEX1.GetRow(i).Cells[2].Text); wApp.Selection.Move(ref unit,ref count); 
    wApp.Selection.TypeText(gridEX1.GetRow(i).Cells[3].Text); wApp.Selection.Move(ref unit,ref count); 
    wApp.Selection.TypeText(gridEX1.GetRow(i).Cells[4].Text); 
    //换行 
    wApp.Selection.MoveRight(ref unit,ref count,ref extend); 



      

  5.   

    可以用word对象保存为mht网页格式
    或者用ADO保存word为mht网页格式。代码我忘了,要翻一下才知道了