TWordApplication.Document.ADD(OLE,OLE,OLE,OLE);
这段程序的参数如何写?

解决方案 »

  1.   

    我也不会,我过我有一段代码 让Word替换标记字符串要使用
    你得先声明几个olevariant.
    var 
    FindText, MatchCase, MatchWholeWord, MatchWildcards, MatchSoundsLike, 
    MatchAllWordForms, Forward, Wrap, Format, ReplaceWith, Replace: OleVariant; WordDocument.Range.Find.Execute,这里用Delphi替换了<#Name>: 
    var 
    FindText, MatchCase, MatchWholeWord, MatchWildcards, MatchSoundsLike, 
    MatchAllWordForms, Forward, Wrap, Format, ReplaceWith, Replace: OleVariant; 
    begin 
    FindText := ’<#Name>’; 
    MatchCase := False; 
    MatchWholeWord := True; 
    MatchWildcards := False; 
    MatchSoundsLike := False; 
    MatchAllWordForms := False; 
    Forward := True; 
    Wrap := wdFindContinue; 
    Format := False; 
    ReplaceWith := ’Delphi’; 
    Replace := True; WordDocument.Range.Find.Execute( FindText, MatchCase, MatchWholeWord, 
    MatchWildcards, MatchSoundsLike, MatchAllWordForms, Forward, 
    Wrap, Format, ReplaceWith, Replace ); end; 总有一天我会不菜的。