急! 调用word的替换功能。为什么只有第一次成功??
Word.Window myWindow = myword.ActiveWindow;Word.Selection mySelection = myWindow.Selection;
Word.Find myFind = mySelection.Find;
object findText = "alow";
object replaceText ="allow";
// Find "alow" and replace with "allow"
myFind.Execute(ref findText,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,ref replaceText,ref missing,ref missing,ref missing,ref missing,ref missing);
前面加个循环。结果只有第一次替换成功。其它的没替换。 而且没报错误!
--------------------编程问答-------------------- 关注一下 --------------------编程问答-------------------- --------------------编程问答-------------------- 有源码吗?
一起学习! --------------------编程问答-------------------- expression.Execute(FindText, MatchCase, MatchWholeWord, MatchWildcards, MatchSoundsLike, MatchAllWordForms, Forward, Wrap, Format, ReplaceWith, Replace, MatchKashida, MatchDiacritics, MatchAlefHamza, MatchControl)
Replace = wdReplaceAll
补充:.NET技术 , ASP.NET