Share via


Text Property

Text Property
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.  

Text property as it applies to the HeaderFooter, TextEffectFormat, and TextRange objects.

Returns or sets a String that represents the text contained in the specified object. Read/write.

expression.Text

expression   Required. An expression that returns one of the above objects.

Text property as it applies to the Comment object.

Returns a String that represents the text in a comment. Read-only.

expression.Text

expression   Required. An expression that returns a Comment object.

Example

As it applies to the TextRange object.

This example sets the text and font style for the title on slide one in the active presentation.

  Set myPres = Application.ActivePresentation
With myPres.Slides(1).Shapes.Title.TextFrame.TextRange
    .Text = "Welcome!"
    .Font.Italic = True
End With