Class HeadersFooters (PowerPoint VBA)

Contains all the HeaderFooter objects on the specified slide, notes page, handout, or master. To use a HeadersFooters class variable it first needs to be instantiated, for example


Dim hfs as HeadersFooters
Set hfs = ActivePresentation.SlideMaster.HeadersFooters

Clear

Clears the header and footer from the specified slide or slides.


ActivePresentation.SlideMaster.HeadersFooters.Clear

DateAndTime

Returns a HeaderFooter object that represents the date and time item that appears in the lower-left corner of a slide or in the upper-right corner of a notes page, handout, or outline.


Dim hfrDateAndTime As HeaderFooter
Set hfrDateAndTime = ActiveWindow.Selection.SlideRange(1).HeadersFooters.DateAndTime

DisplayOnTitleSlide

Determines whether the footer, date and time, and slide number appear on the title slide. Applies to slide masters.

The value of the DisplayOnTitleSlide property can be one of these MsoTriState constants.


ActiveWindow.Selection.SlideRange(1).HeadersFooters.DisplayOnTitleSlide = msoTrue

Returns a HeaderFooter object that represents the footer that appears at the bottom of a slide or in the lower-left corner of a notes page, handout, or outline.


Dim hfrFooter As HeaderFooter
Set hfrFooter = ActiveWindow.Selection.SlideRange(1).HeadersFooters.Footer

Returns a HeaderFooter object that represents the header that appears at the top of a slide or in the upper-left corner of a notes page, handout, or outline.


Dim hfrHeader As HeaderFooter
Set hfrHeader = ActiveWindow.Selection.SlideRange(1).HeadersFooters.Header

SlideNumber

Returns a HeaderFooter object that represents the slide number in the lower-right corner of a slide, or the page number in the lower-right corner of a notes page or a page of a printed handout or outline.


Dim hfrSlideNumber As HeaderFooter
Set hfrSlideNumber = ActiveWindow.Selection.SlideRange(1).HeadersFooters.SlideNumber