Limit.setSelection MethodSets the list SelectedValues for a Limit.[object.]setSelection (valList) Arguments
RemarksIf valList is a Limit object, the selection is copied.The following example uses Limit.setSelection Method to create the values list for a ListBox: // Use getSelection to get the list of SelectedValues from a limit // then use setSelection to set a selection from the array if (ActiveDocument.QueryInProcess == "Q-Expenditures") { var arr = ActiveDocument.Sections["Q-Budget"].Limits["Region"].getSelection(); var oTo = ActiveDocument.Sections["Q-Expenditures"].Limits["Region"]; oTo.setSelection(arr); } // Use setSelection to set a selection directly from another Limit if (ActiveDocument.QueryInProcess == "Q-Expenditures") { var oFrom = ActiveDocument.Sections["Q-Budget"].Limits["Region"]; var oTo = ActiveDocument.Sections["Q-Expenditures"].Limits["Region"]; oTo.setSelection(oFrom); } RequirementsActiveDocument.loadObjectMethods() must be called after the limit 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. |