实现关键字查找word文档里相匹配的内容
点击次数:49 次 发布日期:2008-11-09 08:41:48 作者:源代码网
|
源代码网推荐 下面的例子中用“Delphi”替换了“VB”: 源代码网推荐 var 源代码网推荐 FindText, MatchCase, MatchWholeWord, MatchWildcards, MatchSoundsLike, 源代码网推荐 MatchAllWordForms, Forward, Wrap, Format, ReplaceWith, Replace: OleVariant; 源代码网推荐 begin 源代码网推荐 FindText := "VB"; 源代码网推荐 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 ); 源代码网推荐 源代码网供稿. |
