TextRange.Text property (Publisher)
Returns or sets a String that represents the text in a text range or WordArt shape. Read/write.
Syntax
expression.Text
expression A variable that represents a TextRange object.
Example
The following example adds a rectangle to the active publication and adds text to it.
Sub AddTextToShape()
With ActiveDocument.Pages(1).Shapes.AddShape(Type:=msoShapeRectangle, _
Left:=72, Top:=72, Width:=250, Height:=140)
.TextFrame.TextRange.Text = "Here is some test text"
End With
End Sub
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.