S
samcrm
Unregistered / Unconfirmed
GUEST, unregistred user!
Delphi操纵Word替换指定文本的方法是:
FindText := '<#XM>';
MatchCase := False;
MatchWholeWord := True;
MatchWildcards := False;
MatchSoundsLike := False;
MatchAllWordForms := False;
Forward := True;
Wrap := wdFindContinue;
Format := False;
ReplaceWith := DM.ADOQryMainXM.Value;
Replace := wdReplaceAll;
WordDocument1.Range.Find.Executeold( FindText, MatchCase, MatchWholeWord,
MatchWildcards, MatchSoundsLike, MatchAllWordForms, Forward,
Wrap, Format, ReplaceWith, Replace );
这个只能替换正文中的<#XM>,现在页眉也有<#XM>,请问如何替换?
希望大家不吝赐教,在线2个小时等待...
FindText := '<#XM>';
MatchCase := False;
MatchWholeWord := True;
MatchWildcards := False;
MatchSoundsLike := False;
MatchAllWordForms := False;
Forward := True;
Wrap := wdFindContinue;
Format := False;
ReplaceWith := DM.ADOQryMainXM.Value;
Replace := wdReplaceAll;
WordDocument1.Range.Find.Executeold( FindText, MatchCase, MatchWholeWord,
MatchWildcards, MatchSoundsLike, MatchAllWordForms, Forward,
Wrap, Format, ReplaceWith, Replace );
这个只能替换正文中的<#XM>,现在页眉也有<#XM>,请问如何替换?
希望大家不吝赐教,在线2个小时等待...