4 Replies Latest reply: May 4, 2010 8:33 PM by nish patel RSS

    Selection order not preserved  - MACRO -  or need ordered list of selected value

      Hi,

       

      I'm having problem with selection order, i want "Ordered" selection, like if i select 2006-Q1,2005-Q1, 2004-Q1 it should select that in that order when write following:

      Selected_Date = ActiveDocument.fields("Quarter").GetSelectedValues

      Instead it gives me random selection.

      for i = 0 to Selected_Date.Count - 1
      StartQuarter = StartQuarter & " - " & Selected_Date.Item(i).Text
      next

      Then i store it in the Variable and display in the TextObject. i Want Output 2004-Q1,2005-Q1,2006-Q1

      Can anyone help Please!