Ellen

Sub 替换页眉页脚()
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then ActiveWindow.Panes(2).Close
With ActiveWindow.ActivePane.View
  .Type = wdPrintView
  .SeekView = wdSeekCurrentPageHeader
  Selection.WholeStory
  Selection.Delete Unit:=wdCharacter, Count:=1
  Selection.TypeText Text:="这是替换后的页眉"
  .SeekView = wdSeekMainDocument
End With

WordBasic.ViewFooterOnly
Selection.WholeStory
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="这是替换后的页脚"
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub

分类:

技术点:

相关文章:

  • 2021-12-13
  • 2021-12-05
  • 2021-11-28
  • 2022-01-02
  • 2021-09-12
猜你喜欢
  • 2022-12-23
  • 2021-12-01
  • 2021-08-31
  • 2021-10-29
相关资源
相似解决方案