A
avkokin
Whether Probably and How can I improve this macro? It delete all
Headers&Footers from all sections of active document. Thank you.
Sub test4()
Dim sec As Section
Dim hf As HeaderFooter
Dim rng As Range
For Each sec In ActiveDocument.Sections
For Each hf In sec.Headers
hf.Range.Delete
Next hf
For Each hf In sec.Footers
hf.Range.Delete
Next hf
Next sec
End Sub
Headers&Footers from all sections of active document. Thank you.
Sub test4()
Dim sec As Section
Dim hf As HeaderFooter
Dim rng As Range
For Each sec In ActiveDocument.Sections
For Each hf In sec.Headers
hf.Range.Delete
Next hf
For Each hf In sec.Footers
hf.Range.Delete
Next hf
Next sec
End Sub