Add a Date, Footer, and Slide Number to PowerPoint Slides with VBA
Question details
Add a footer, creation date, and slide number to PowerPoint slides created by an Excel VBA macro.

- Product
- Microsoft Excel and Microsoft PowerPoint
- Device & OS
- not provided
- Scenario
- An Excel macro creates PowerPoint slides and needs to display footer information on each new slide.
- Observed behavior
- Each generated slide should show custom footer text, a fixed creation date, and its slide number.
Open the PowerPoint presentation that the Excel macro will use, and confirm that macros are permitted in Excel. In the VBA editor, check Tools > References for the Microsoft PowerPoint Object Library if your code uses PowerPoint-specific types and constants.
Set footer, date, and slide number properties in Excel VBA
Use this method when your Excel macro already creates or selects a PowerPoint slide.
In Excel, open Developer > Visual Basic and locate the procedure that creates the PowerPoint slide.
After the line that assigns the new slide to PPSlide, add: With PPSlide.HeadersFooters .Footer.Visible = msoTrue .Footer.Text = "My Text" .DateAndTime.Visible = msoTrue .DateAndTime.UseFormat = msoFalse .DateAndTime.Text = "Created " & Format(Now, "mm/dd/yyyy") .SlideNumber.Visible = msoTrue End With
Run the procedure from Excel's Developer > Macros dialog, then open the generated slide in PowerPoint to check the footer, date, and slide number.

Check the PowerPoint slide layout for footer placeholders
Use this check if the VBA properties are set but the date, footer, or slide number is not visible.
Add Slide Dates and Numbers with WPS Presentation
WPS Office is a free, lightweight alternative for working with presentations and spreadsheets in a familiar interface. Open existing Office files and add slide information manually; WPS does not fix Microsoft PowerPoint or Excel VBA automation.

Frequently Asked Questions
Where should I put the footer code in my Excel macro?
Place it after the statement that creates or selects the slide and assigns it to PPSlide. That ensures the HeadersFooters settings apply to the intended slide.
Will the creation date update automatically?
No. Setting DateAndTime.UseFormat to msoFalse and assigning DateAndTime.Text stores a fixed text value when the macro runs.
Why is the slide number missing even though Visible is set to msoTrue?
Check the slide's layout under View > Slide Master for a slide-number placeholder. Also check Insert > Header & Footer and whether Don't show on title slide is selected.
Why does Excel not recognize the PowerPoint object types?
In the Excel VBA editor, open Tools > References and select the Microsoft PowerPoint Object Library. The example uses PowerPoint-specific types such as PowerPoint.Slide.




