Share via


Viewer.CustomPropertyValue 屬性 (Visio 檢視器)

取得圖形資料項目的值, (自訂屬性) 指定之圖形在 Microsoft Visio 檢視器 中指定的索引位置。 唯讀。

語法

運算式CustomPropertyValue (ShapeIndexPropertyIndex)

表達 會傳回 Viewer 物件的 運算式。

參數

名稱 必要/選用 資料類型 描述
ShapeIndex 必要 Long 包含指定之圖形資料項目的圖形索引 (自訂屬性) 。
PropertyIndex 必要 Long 圖形資料項目的索引 (自訂屬性) 。

傳回值

字串

註解

在 Microsoft Office Visio 2007 之前的 Visio 版本中,圖形資料項目稱為自訂屬性。

範例

下列程式碼會取得第一個圖形資料項目的值,該資料項目指派給Visio 檢視器中目前頁面上圖案集合中的第一個圖案。 如果指定之自訂屬性的值為 Hello,Visio 檢視器會顯示訊息方塊和 [屬性及設定] 對話方塊。

Dim strPropertyValue As String

strPropertyValue = vsoViewer.CustomPropertyValue(1,1)

Debug.Print strPropertyValue

If strPropertyValue = "Hello" Then

    Interaction.MsgBox ("Value is 'Hello'")

    vsoViewer.DisplayPropertyDialog

End If

支援和意見反應

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