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

分类:

技术点:

相关文章:

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