View Full Version : Numbering Every Other Slide
Hello,
I'm looking for a way to number every other slide in PowerPoint sequentially. For example:
Slide 1 = <no page number>
Slide 2 = Page 1
Slide 3 = <no page number>
Slide 4 = Page 2
Slide 5 = <no page number>
Slide 6 = Page 3
and so on...Is this possible? Any ideas?
Thanks a lot,
Rome
Cosmo
06-06-2008, 10:24 AM
This will set the footer to the page number
Dim i As Integer
Dim j As Integer
For i = 1 To ActiveWindow.Presentation.Slides.Count
j = i * 2
If j <= ActiveWindow.Presentation.Slides.Count Then
With ActiveWindow.Presentation.Slides(j).HeadersFooters.Footer
.Text = "Page " & i
.Visible = msoTrue
End With
With ActiveWindow.Presentation.Slides(j - 1).HeadersFooters.Footer
.Text = ""
End With
End If
Next i
Thanks a lot Cosmo! Appreciate the quick reply.
Follow up question - Is there a way to modify the code so that Page 1 starts on Slide 3?
John Wilson
06-12-2008, 03:13 AM
Sub nums()
Dim i As Integer
Dim num As Integer
For i = 3 To ActivePresentation.Slides.Count Step 2
num = num + 1
With ActivePresentation.Slides(i).HeadersFooters.Footer
.Visible = True
.Text = "Slide " & num
End With
Next
End Sub
MCSimmons
06-24-2008, 01:03 PM
Thanks! helped me as well
Ignore this post - I figured out what I was doing wrong.
Two years later and I'm using '07, but now the macro does not work. I get the following error message:
Run-time error '-2147188160 (80048240)':
HeaderFooter (unknown member) : Invalid request.
And when I click on Debug, the following text is highlighted in yellow: .Text = "Slide " & num
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.