有没有办法用键盘在 Word 中同一类型的标题之间导航?这相当于 emacs 中的 ctrl+arrow。
在大纲或草稿视图中。在帮助文件中找不到类似的东西。谢谢!
答案1
您可以添加宏,然后为其分配键盘快捷键。以下是宏代码(您也可以通过录制来创建)。
Sub Movebetweenheaders()
'
' Movebetweenheaders Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Style = Selection.Style
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
End Sub
Sub MovebetweenheadersBack()
'
' MovebetweenheadersBack Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Style = Selection.Style
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = False
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
End Sub
如果您不确定如何为宏分配键盘快捷键:分配快捷方式
来自 OP 的编辑:我已将代码答案更新为问题的完整解决方案。