我用C# 执行Find.Execute。可以正常执行替换,但是有个问题,一旦碰到行首,就被自动替换成大写字母,而我不希望他自动更正。将被替换doc的自动更正选项取消后 执行代码依然无效。
求教大神们,有谁用过代码编写的word替换字符串,如何取消这里面的自动更正?
P_Find.Text = sourece; //替换源
P_Find.Replacement.Text = des;//替换目的
object P_Replace = Word.WdReplace.wdReplaceAll; //定义替换方式对象
bool P_bl = P_Find.Execute( //开始替换
ref G_Missing, ref G_Missing, ref G_Missing,
ref G_Missing, ref G_Missing, ref G_Missing, ref G_Missing,
ref G_Missing, ref G_Missing, ref G_Missing, ref P_Replace,
ref G_Missing, ref G_Missing, ref G_Missing, ref G_Missing);
C# Find.Execute Word替换字符串,如何取消自动更正?
答案:1 悬赏:0
解决时间 2021-02-18 07:03
- 提问者网友:涼初透
- 2021-02-17 11:58
最佳答案
- 二级知识专家网友:24K纯糖
- 2021-02-17 13:36
P_Find.Text = sourece; //替换源
P_Find.Replacement.Text = des;//替换目的
object P_Replace = Word.WdReplace.wdReplaceAll; //定义替换方式对象
bool P_bl = P_Find.Execute( //开始替换
P_Find.Replacement.Text = des;//替换目的
object P_Replace = Word.WdReplace.wdReplaceAll; //定义替换方式对象
bool P_bl = P_Find.Execute( //开始替换
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯