Share via


TextRange.InsertSlideNumber Method (PowerPoint)

Inserts the slide number of the current slide into the specified text range. Returns a TextRange object that represents the slide number.

Syntax

expression .InsertSlideNumber

expression A variable that represents an TextRange object.

Return Value

TextRange

Remarks

The inserted slide number is automatically updated when the slide number of the current slide changes.

Example

This example inserts the slide number of the current slide after the first sentence of the first paragraph in shape two on slide one in the active presentation.

Set sh = Application.ActivePresentation.Slides(1).Shapes(2)

Set sentOne = sh.TextFrame.TextRange.Paragraphs(1).Sentences(1)

sentOne.InsertAfter.InsertSlideNumber

See Also

Concepts

TextRange Object

TextRange Object Members