如何将WordDocument1已打开的文档另存为网页(htm格式)?
另外请问如何调用一个word已定义的宏?

解决方案 »

  1.   

    uses filesystemobject create .htm file write content to it. 
      

  2.   

    WordDocument的SaveAs函数能否将文档另存为htm格式?
      

  3.   

    may be , but before using saveas , may need use other function proivide saveto's type
      

  4.   

    var WordApp,WordDoc:OleVariant;
    begin
    if opendialog1.Execute then
    begin
      WordApp:=CreateOleObject('Word.Application');
      WordDoc:=WordApp.Documents.Add(opendialog1.FileName);
      WordDoc.SaveAs('e:\bian.htm',wdFormatHTML);//wdFormatHTML是word2000.pas单元里的常量,需要uses word2000;  WordDoc.Close;
      WordApp.Quit;
      WordDoc:=UnAssigned;
      WordApp:=UnAssigned;