0 Replies Latest reply: May 30, 2012 9:48 AM by dferreiros2g RSS

    Get the selected column in a table



      I'm trying to do a macro that triggers when a selection is made and check at what column of the table are you cliking at.

      I already got the code to loop throught the fields but I cannot know if the exprecsion colum are selected or not.


      That's the macro:




      sub testTable
           set objCust = ActiveDocument.Fields("Sub Region")
           set table = ActiveDocument.getsheetobject("CH16").getrelevantselections
           for rowIter = 1 to table.GetRowCount-1
                set cell = table.GetCell(rowIter,1)
                set cell = table.GetCell(rowIter,2)
      end sub 

      I attach the file too.