Shape.Text Property
Visio Automation Reference |
Returns all of the shape's text. Read/write.
Version Information
Version Added: Visio 2.0
Syntax
expression.Text
expression A variable that represents a Shape object.
Return Value
String
Remarks
In the text returned by the Text property of a Shape object, fields are represented by an escape character (30 (&H1E)) For example, if a Shape object's text contains a field that displays the file name of a drawing, the Shape object's Text property returns an escape character where that field is inserted into the text. If you want the text to contain the expanded field, get the shape's Characters property, and then get the Text property of the resulting Characters object.
If the shape is a group, the text returned is dependent on the value of the IsTextEditTarget cell.
- If IsTextEditTarget is TRUE, the Text property of the Shape object returns the text of the group.
- If IsTextEditTarget is FALSE, the Text property of the Shape object returns the text of the shape in the group at the top of the stacking order.
Objects from other applications and guides do not have a Text property.
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to get the Text property of a shape.
Visual Basic for Applications |
---|
|
See Also