Shape.AlternativeText プロパティ (Visio)

オブジェクトに関連付けられている代替テキストの説明を設定または返します。 値の取得と設定が可能です。

構文

AlternativeText

Shape オブジェクトを表す変数。

戻り値

文字列

注釈

Visio を使用してアクセス可能な図を作成するには、このプロパティを使用します。

注:

Microsoft Visio 2016 C2R 以降では、ページ図形およびマスター オブジェクトで AlternativeText を使用できます。

このVisual Basic for Applications (VBA) マクロは、図形の AlternativeText プロパティを設定して取得する方法を示しています。

 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

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。