TextRange.InsertSlideNumber (PowerPoint)
Inserts the slide number of the current slide into the specified text range. Returns a TextRange object that represents the slide number.
The inserted slide number is automatically updated when the slide number of the current slide changes.
Dim treInsertSlideNumber As TextRange
Set treInsertSlideNumber = ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.InsertSlideNumber()