View Single Post
 
Old 09-11-2022, 03:22 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,374
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

All you should need is:
Code:
Sub RemoveHeadAndFoot()
Application.ScreenUpdating = False
Dim Sctn As Section, HdFt As HeaderFooter
For Each Sctn In ActiveDocument.Sections
  For Each HdFt In Sctn.Headers
    With HdFt
      If .Exists = True Then .Range.Text = vbNullString
    End With
  Next
  For Each HdFt In Sctn.Footers
    With HdFt
      If .Exists = True Then .Range.Text = vbNullString
    End With
  Next
Next
End Sub
For PC macro installation & usage instructions, see: Installing Macros
For Mac macro installation & usage instructions, see: Word:mac - Install a Macro
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote