IR Framework

Shape.GetValue Method

Collects values from a given control.
[object.]GetValue ()

Arguments

object
Required. A Shape object. This can be a CheckBox, RadioButton, TextLabel, TextBox, DropDown, or ListBox.

Return Value

The GetValue function returns the following values:
If object is a... GetValue returns an array containing...
CheckBox or RadioButton one element containing the boolean value of the Checked property of the object.
TextLabel or TextBox one element containing the string value of the Text property of the object.
DropDown one element containing the string value of the selected item ( object.Item(object.SelectedIndex) ).
ListBox zero or more elements containing the string value(s) of the items in the SelectedList.

Remarks

The following example uses Shape.GetValue Method to determine whether a value is selected in a ListBox:

var oList = ActiveDocument.Sections["Dashboard"].Shapes["lstFoo"];
Alert(oList.GetValue().length);

Requirements

ActiveDocument.loadObjectMethods() must be run after the shape object is created and before this object method is used.