Shape.AlternativeText property (Visio)
Returns or sets the alternative text description associated with an object. Read/write.
Syntax
expression.AlternativeText
expression A variable that represents a Shape object.
Return value
String
Remarks
Use this property to create accessible diagrams by using Visio.
Note
Beginning with Microsoft Visio 2016 C2R, you can use AlternativeText on Page, Shape, and Master objects.
Example
This Visual Basic for Applications (VBA) macro shows how to set and get the AlternativeText property of a shape.
public Sub ShapeAlternativeText_Example()
Dim vsoRectangle As Visio.Shape
'Create a rectangle shape and add alternative text to it.
Set vsoRectangle = ActivePage.DrawRectangle(2, 3, 5, 4)
vsoRectangle.AlternativeText = "Rectangle Shape alternative 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 alternative text to verify the proper Shape
'object was returned.
Debug.Print vsoShapeFromCell.AlternativeText
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.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기