MS word

  • Thread starter removing all headers and footers
  • Start date
R

removing all headers and footers

How do I get rid of all headers and footers at once, and fix the template so
none ever appear? I never use them, but somehow they creep in. JF
 
S

Stefan Blom

To delete headers and footers in a document: Activate the header/footer
view, for examply by double-clicking the header. Then delete the header and
footer contents.

Note that each Word section can have up to three different headers (and
footers), namely, if the "Different odd and even" and "Different first page"
options are both checked in the Page Layout dialog box. Each type of header
(footer) must be deleted separately. For more on headers and footers, see
http://sbarnhill.mvps.org/WordFAQs/HeaderFooter.htm.

To delete headers and footers in a template, you'll do the same as for
documents. Just remember to open the template as a document (via the Open
dialog box) first.

If you want a macro solution, here's a simple one:

Sub DeleteHeadersAndFooters()
Dim s As Section
For Each s In ActiveDocument.Sections
s.Headers(wdHeaderFooterEvenPages).Range.Text = ""
s.Headers(wdHeaderFooterFirstPage).Range.Text = ""
s.Headers(wdHeaderFooterPrimary).Range.Text = ""

s.Footers(wdHeaderFooterEvenPages).Range.Text = ""
s.Footers(wdHeaderFooterFirstPage).Range.Text = ""
s.Footers(wdHeaderFooterPrimary).Range.Text = ""

Next s
End Sub

For assistance, see http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP


in message
news:[email protected]...
 
R

removing all headers and footers

Many thanks, Joe
Stefan Blom said:
To delete headers and footers in a document: Activate the header/footer
view, for examply by double-clicking the header. Then delete the header and
footer contents.

Note that each Word section can have up to three different headers (and
footers), namely, if the "Different odd and even" and "Different first page"
options are both checked in the Page Layout dialog box. Each type of header
(footer) must be deleted separately. For more on headers and footers, see
http://sbarnhill.mvps.org/WordFAQs/HeaderFooter.htm.

To delete headers and footers in a template, you'll do the same as for
documents. Just remember to open the template as a document (via the Open
dialog box) first.

If you want a macro solution, here's a simple one:

Sub DeleteHeadersAndFooters()
Dim s As Section
For Each s In ActiveDocument.Sections
s.Headers(wdHeaderFooterEvenPages).Range.Text = ""
s.Headers(wdHeaderFooterFirstPage).Range.Text = ""
s.Headers(wdHeaderFooterPrimary).Range.Text = ""

s.Footers(wdHeaderFooterEvenPages).Range.Text = ""
s.Footers(wdHeaderFooterFirstPage).Range.Text = ""
s.Footers(wdHeaderFooterPrimary).Range.Text = ""

Next s
End Sub

For assistance, see http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP


in message
 
R

removing all headers and footers

Oh, also , can I delete headers and footers in the styles and formatting pane
somehow, they keep coming back after I delete them there? thanks, Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top