Thank you! This worked great when I tested it using the automated slide number function in a new workbook; however, the code isn't working for the workbook that I am working in. I think that the issue is that the p
age numbers were not inserted through the slide number function and certain slides are skipped in the numbering and do not have page numbers on them. The original code I had was recognizing the page number and moving it for whatever my active slide was but wasn't looping through all of the slides.
Originally Posted by
John Wilson
Like this but NOTE your measurements might put the number off slide This is for a PC it will not work on a Mac
Sub MovePageNumber()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
Set oshp = getNumber(osld)
If Not oshp Is Nothing Then
oshp.Left = 775
oshp.Top = 5
End If
Next oshp
Next osld
End Sub
Function getNumber(osld As Slide) As Shape
For Each getNumber In osld.Shapes
If getNumber.Type = msoPlaceholder Then
If getNumber.PlaceholderFormat.Type = ppPlaceholderSlideNumber Then
Exit For
End If
End If
Next
End Function