如何从word文件中删除所有分节符

时间:2014-06-19 07:13:24

标签: c#

我想从我的word文件中删除所有分节符,我使用此代码,但它只删除分页符,而不删除分节符。

app.ActiveWindow.Selection.Find.Execute("^m", false, false, ref o, ref o, ref o, true, ref findWrap, true, "", ref replace, ref o, ref o, ref o, ref o); 

1 个答案:

答案 0 :(得分:0)

您应该使用“^ 12”作为替换字符串。您可以看到替换代码列表here。另请阅读关于^ m的说明:当打开使用通配符选项时,它会查找或替换分节符