给你作参考:
var
MsWord:Variant;
……
try
MSWord := CreateOleObject('Word.Application');
except
Application.MessageBox('Word 应用软件存在问题!请检查后再运行。','用户提示',MB_OK);
exit;
end;
MsWord.Visible := True;
MsWord.Selection.Find.Execute ( FindText:= '你要找的字符串', ReplaceWith:= '你要替换的字符串',
Replace:= 1 ,MatchWholeWord := TRUE );