I am trying to make a macro to update the page count of visible pages.
I have a code like this:
Sub SetVisiblePageNumers()
Dim pageNumber As Integer
Dim pp As String
pageNumber = 1
For Each page In Application.ActivePresentation.Slides
If (page.SlideShowTransition.Hidden = False) Then
For Each found In page.Shapes
If found.**IsAPageNumberTextBox** Then
found.TextFrame.TextRange = CStr(pageNumber)
' pp = found.TextFrame.Comment
End If
Next
pageNumber = pageNumber + 1
End If
Next
End Sub
The field IsAPageNumberTextBox does not exist. But I am trying to find a way of knowing the text box is a page number. The text ‹#› is converted to page number. However I do not see how I can find this text as it would be a way of knowing that my text box is for the number.
found.Name Like "Slide Number Placeholder*"
Tijdelijke aanduiding voor dianummer
)