Text property (Characters object)
Returns the range of text represented by a Characters object, which may be a subset of the shape's text depending on the values of the Characters object's Begin and End properties.
Version added
2.0
Syntax
| |
| |
strRet |
Variant. The text of the Characters object returned in a Variant of type String. |
object |
Required. An expression that returns the Characters object that owns the text. |
stringExpression |
Required Variant. The text of the Characters object in a Variant of type String. |
Remarks
The text for a Characters object is returned in a Variant of type String, as opposed to in a String. This is typically transparent if you're using Microsoft Visual Basic or Visual Basic for Applications. If you are using C/C++ and want a String rather than a Variant, use the TextAsString property.
In the text returned by a Characters object, fields are expanded to the number of characters that are visible in the drawing window. For example, if a shape's text contains a field that displays the file name of a drawing, the Text property of a Characters object returns the expanded file name (provided the Begin and End properties were not altered).
If a Characters object represents the text of a shape that is a group, it will always return the text of the group.
Objects from other applications and guides don't have a Text property.