TextFrame2.TextRange property (PowerPoint)
Returns a TextRange2 object (PowerPoint) object that represents the text in the specified text frame. Read-only.
Syntax
expression. TextRange2
expression An expression that returns a TextFrame2 object.
Return value
TextRange2
Example
This example shows how to set the text for shape one on slide one of the active presentation to the word "Hello!"
Public Sub TextRange_Example()
Dim pptSlide As Slide
Set pptSlide = ActivePresentation.Slides(1)
pptSlide.Shapes(1).TextFrame2.TextRange = "Hello!"
End Sub
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.