【发布时间】:2019-10-31 19:15:54
【问题描述】:
我需要在所有包含特定单词(如“S U M M A R Y”)的页面之后添加一个空白页面。
Sub SelFind()
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = "S U M M A R Y "
Selection.GoTo What:=wdGoToBookmark, Name:="\Page"
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.InsertBreak Type:=wdPageBreak
End With
lbl_Exit:
Exit Sub
End Sub
这是针对单个页面进行的。如何循环浏览所有页面。
【问题讨论】:
-
在答案中使用代码,简单的
Do循环就可以正常工作。