IR Framework

Shape.SetList Method

Sets the list of available values for a given control.
[object.]SetList (valList)

Arguments

object
Required. A Shape object. This can be a DropDown or ListBox.


valList
Required. An array or a Column containing the value(s) to set.

Return Value

The SetList function returns the number of seconds it took to populate the Shape.


Remarks

The following example uses Shape.SetList Method to create the values list for a ListBox:

var oList = ActiveDocument.Sections["Dashboard"].Shapes["lstFoo"];
var arr = new Array("January", "February", "March", "April", "May", "June");
oList.SetList(arr);

Requirements

ActiveDocument.loadObjectMethods() must be called after the shape object is created and before this object method is used.
If valList is a column object, ActiveDocument.loadObjectMethods() must be called after the column is created.