标题:[求助]C# 操作 word 查找替换
只看楼主
nightcity
Rank: 1
等 级:新手上路
帖 子:33
专家分:0
注 册:2007-3-15
得分:0 
最后一次顶了,会的说说啊吖`~~~~~

http://hi.baidu.com/qbbwinner
2007-10-25 22:25
nightcity
Rank: 1
等 级:新手上路
帖 子:33
专家分:0
注 册:2007-3-15
得分:0 

C# 复制代码
private void SearchReplace()
{
object replaceAll = Word.WdReplace.wdReplaceAll;

Application.Selection.Find.ClearFormatting();
Application.Selection.Find.Text = "find me";

Application.Selection.Find.Replacement.ClearFormatting();
Application.Selection.Find.Replacement.Text = "Found";

Application.Selection.Find.Execute(
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref replaceAll, ref missing, ref missing, ref missing, ref missing);
}

有代码,但我还是不行~~~ 有会的人吗?。。。


http://hi.baidu.com/qbbwinner
2007-11-01 14:24



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-178938-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.685538 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved