首页 新闻 搜索 专区 学院

word控件打印字符串参量过长的错误

0
悬赏园豆:100 [已关闭问题]

 

1 public bool SearchReplace(string strOldText, string strNewText)
2 {
3 object replaceAll = Microsoft.Office.Interop.Word.WdReplace.wdReplaceAll;
4 object missing = Type.Missing;
5
6 //首先清除任何现有的格式设置选项,然后设置搜索字符串 strOldText。
7   this.oWordApplic.Selection.Find.ClearFormatting();
8 oWordApplic.Selection.Find.Text = strOldText;
9
10 oWordApplic.Selection.Find.Replacement.ClearFormatting();
11 oWordApplic.Selection.Find.Replacement.Text = strNewText;
12
13 if (oWordApplic.Selection.Find.Execute(
14 ref missing, ref missing, ref missing, ref missing, ref missing,
15 ref missing, ref missing, ref missing, ref missing, ref missing,
16 ref replaceAll, ref missing, ref missing, ref missing, ref missing))
17 {
18 return true;
19 }
20 return false;
21 }
22  

 

 

 

Sam_Zhang的主页 Sam_Zhang | 初学一级 | 园豆:105
提问于:2010-06-04 20:59
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册