Function Reference

_PPT_HeaderFooterGet

Sets the Header/Footer for a Slide/Slides or the SlideMaster/NotesMaster/HandoutMaster/TitleMaster of a Presentation.

#Include <PowerPoint.au3>
_PPT_HeaderFooterGet($oPresentation, $iFlag[, $sFooter = Default[, $sHeader = Default[, $sDateAndTime = Default[, $bSlideNumber = Default[, $vSlides = 0]]]]])

 

Parameters

$oPresentation Presentation object.
$iFlag Processing options. Can be a combination of the following values:
  1 - Set the SlideMaster Footer
  2 - Set the NotesMaster Footer and/or Header
  4 - Set the HandoutMaster Footer and/or Header
  8 - Set the TitleMaster Footer
 16 - Set the Footer for the specified Slide(s)
 32 - Clear Header/Footer information that has been set for individual Slides to make sure all Slides display the Header and information you define for the SlideMaster
 64 - Specifies if the Footer/Header for the Slide(s)/SlideMaster/NotesMaster/HandoutMaster/TitleMaster will be visible
128 - Determines whether the footer, date and time, and slide number appear on the title slide. Applies to slide masters
256 - Updates all existing Slides with the specified Header/Footer settings
$sFooter [optional] Text to use for the Footer. "" will reset the Footer text (default = keyword Default = do not set the Footer).
$sHeader [optional] Text to use for the Header. "" will reset the Header text (default = keyword Default = do not set the Header).
$sDateAndTime [optional] Format for the automatically updated date and time. Use the PpDateTimeFormat enumeration (default = keyword Default = do not set the DateAndTime).
$bSlideNumber [optional] Displays the SlideNumber if set to True (default = keyword Default = do not set the SlideNumber).
$vSlides [optional] Slide(s) to process. Please see _PPT_SlideRangeSet for possible values (default = 0 = all Slides).

 

Return Value

Success: 1.
Failure: 0 and sets @error.
    1 - $oPresentation has to be a presentation
    2 - Error occurred when setting the Footer for the SlideMaster. @extended is set to the COM error code
    3 - Error occurred when setting the Footer/Header for the NotesMaster. @extended is set to the COM error code
    4 - Error occurred when setting the Footer/Header for the HandoutMaster. @extended is set to the COM error code
    5 - Error occurred when setting the Footer for the TitleMaster. @extended is set to the COM error code
    6 - Error occurred when setting the Footer for a SlideRange. @extended is set to the COM error code
    7 - Error returned from _PPT_SetSlideRange. @extended is set to the error code returned by this function
    8 - Error clearing individual Header/Footer information

 

Remarks

CustomLayout and NotesPage can not be processed using this function.
HeaderFooter objects aren't available for Slide objects that represent Notes pages.
The HeaderFooter object that represents a header is available only for a NotesMaster or HandoutMaster.

Parameter $sDateAndTime: https://docs.microsoft.com/en-us/office/vba/api/powerpoint.ppdatetimeformat

See: https://stackoverflow.com/questions/35739457/vba-powerpoint-2010-replacing-text-in-headers-and-footers

 

Related

_PPT_HeaderFooterList