I am trying to get the variable "MyList" to only have unique values. It works fine when I just load all of the values, but I can't prevent duplicates. The values are sorted alphabetically, so it shouldn't be that difficult, but I am at a loss. Any help would be greatly appreciated. Thanks!
var MyList =
ActiveDocument.Sections["Dashboard - Customer Reports2"].Controls["DropDown2"]
MyList.RemoveAll() ;
var RowCount = ActiveDocument.Sections["Results - Customer Selection"].RowCount
var MyCol = ActiveDocument.Sections["Results - Customer Selection"].Columns["Sales Territory"]
for (j = 1 ; j <= RowCount ; j = j+1)
{
var Temp = MyCol.GetCell(j)
MyList.Add(Temp)
}
var MyList =
ActiveDocument.Sections["Dashboard - Customer Reports2"].Controls["DropDown2"]
MyList.RemoveAll() ;
var RowCount = ActiveDocument.Sections["Results - Customer Selection"].RowCount
var MyCol = ActiveDocument.Sections["Results - Customer Selection"].Columns["Sales Territory"]
for (j = 1 ; j <= RowCount ; j = j+1)
{
var Temp = MyCol.GetCell(j)
MyList.Add(Temp)
}