Viewer.CustomPropertyValue property (Visio Viewer)

Gets the value of the shape data item (custom property) at the specified index position for the specified shape in Microsoft Visio Viewer. Read-only.

Syntax

expression.CustomPropertyValue (ShapeIndex, PropertyIndex)

expression An expression that returns a Viewer object.

Parameters

Name Required/Optional Data type Description
ShapeIndex Required Long The index of the shape that contains the specified shape data item (custom property).
PropertyIndex Required Long The index of the shape data item (custom property).

Return value

String

Remarks

In versions of Visio prior to Microsoft Office Visio 2007, shape data items were called custom properties.

Example

The following code gets the value of the first shape data item assigned to the first shape in the collection of shapes on the current page in Visio Viewer. If the value of the specified custom property is Hello, Visio Viewer displays a message box and the Properties and Settings dialog box.

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

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.