VC替换WORD,下面这段代码不好使。我想全文替换一个字符串,请高手给个好使的例子 Find wordFind;
Selection wordSel;         m_doc.Select();
wordSel = m_WordApp.GetSelection();
wordFind = wordSel.GetFind(); CComVariant FindText = strOld;
CComVariant MatchCase = false; 
CComVariant MatchWholeWord = false; 
CComVariant MatchWildcards = false; 
CComVariant MatchSoundsLike = false; 
CComVariant MatchAllWordForms = false; 
CComVariant Forward = true; 
//CComVariant Wrap = true; 
CComVariant Format = false; 
CComVariant ReplaceWith = strNew; 
// CComVariant Replace = true; 
    CComVariant Warp(_T("wdFindContinue"));
        CComVariant Replace(_T("wdReplaceAll"));wordFind.Execute(&FindText, &MatchCase, &MatchWholeWord, 
&MatchWildcards, &MatchSoundsLike, 
&MatchAllWordForms, &Forward,
&Warp, &Format, 
&ReplaceWith, &Replace,
&covFalse, &covFalse, 
&covFalse, &covFalse);