Viewer.CustomPropertyValue 屬性 (Visio 檢視器)

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

語法

運算式。CustomPropertyValue (ShapeIndex、 PropertyIndex)

運算式 傳回 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 支援與意見反應。