-1

我在 Word 文档的标题中有一些文本。

我有一个查找和替换方法,可以搜索文本,然后在找到时替换它。

如何仅选择标题作为关键字搜索和替换的范围?

4

1 回答 1

1

访问标题并在其中找到?

this.Doc.Sections[1].Headers[Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Find()

或选择标题并搜索选择:

this.Doc.Sections[1].Headers[Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Select
Application.Select.Find()
于 2017-06-26T19:47:58.180 回答