Share via


TextFrame2.TextRange Property

Returns a TextRange object that represents the text in the specified text frame. Read-only.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
ReadOnly Property TextRange As TextRange2
    Get
'Usage
Dim instance As TextFrame2
Dim value As TextRange2

value = instance.TextRange
TextRange2 TextRange { get; }

Property Value

Type: Microsoft.Office.Core.TextRange2
TextRange

Examples

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

Reference

TextFrame2 Interface

TextFrame2 Members

Microsoft.Office.Interop.PowerPoint Namespace