![]() |
#3
|
||||
|
||||
![]()
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 Mac macro installation & usage instructions, see: Word:mac - Install a Macro
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
footer, header, macro word |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
abrogard | Word | 2 | 05-15-2022 06:50 PM |
Adding text to the header and footer without removing all other content in the header and footer | digitalelise | Word VBA | 2 | 10-23-2019 02:58 AM |
Add, Resize & Relocate Header & Footer with Macros | Sarah123 | Word VBA | 11 | 11-13-2018 07:15 AM |
![]() |
frangipan | Word | 2 | 07-11-2014 12:27 PM |
How do I remove header and footer | captn1 | Word | 2 | 09-04-2010 04:14 PM |