Visio (的 Shape.Title 屬性)

會傳回或設定與 物件相關聯的替代文字。 讀取/寫入。

語法

運算式標題

表達 代表 Shape 物件的變數。

傳回值

字串

註解

使用此屬性可使用 Visio 建立可存取的圖表。

注意事項

從 Microsoft Visio 2016 C2R 開始,您可以在PageShapeMaster物件上使用Title

範例

這個 Visual Basic for Applications (VBA) 宏會示範如何設定及取得圖形的 Title 屬性。

 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

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應