Table of contents
TOC
Collapse the table of content
Expand the table of content

TextRange2.Parent Property (Office)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Gets the Parent object for the TextRange2 object. Read-only.

Syntax

expression. Parent

expression An expression that returns a TextRange2 object.

Return Value

Object

Example

This example adds an oval containing text to slide one in the active presentation and rotates the oval and the text 45 degrees. The parent object for the text frame is the Shape object that contains the text.

Set myShapes = ActivePresentation.Slides(1).Shapes 
With myShapes.AddShape(Type:=msoShapeOval, Left:=50, _ 
 Top:=50, Width:=300, Height:=150).TextFrame 
 .TextRange2.Text = "Test text" 
 .Parent.Rotation = 45 
End With

See also

Concepts

TextRange2 Object

Other resources

TextRange2 Object Members

© 2018 Microsoft