Shape.Title property (Visio)
Returns or sets the alternative text associated with an object. Read/write.
Syntax
expression.Title
expression A variable that represents a Shape object.
Return value
String
Remarks
Use this property to create accessible diagrams by using Visio.
Example
This Visual Basic for Applications (VBA) macro shows how to set and get the Title property of a shape.
public Sub ShapeTitle_Example()
Dim vsoRectangle As Visio.Shape
'Create a rectangle shape and add title text to it.
Set vsoRectangle = ActivePage.DrawRectangle(2, 3, 5, 4)
vsoRectangle.Title = "Rectangle Shape title text"
'Get a Cell object from the shape.
Set vsoCell = vsoRectangle.Cells("Width")
'Use the Shape property to get the Shape object.
Set vsoShapeFromCell = vsoCell.Shape
'Use shape's title text to verify the proper Shape
'object was returned.
Debug.Print vsoShapeFromCell.Title
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.