4 Replies Latest reply on Jun 5, 2013 10:00 AM by Jennifer Hearing

    Selecting last row of table

    Jennifer Hearing

      I'm trying to select the last row in a table. The tables will have a different number of rows, so I cannot select based on a row number. I tried using the location options, but get an error that "The Object is not a function." Not sure what the problem is.

       

      table = app.selection[0];
      if (table.hasOwnProperty("baseline")) table = table.parent;
      if (table instanceof Cell) table = table.parent;
      if (table instanceof Column) table = table.parent;
      if (table instanceof Row) table = table.parent;
      if (table instanceof Table)
      
      {
                  table.rows(LocationOptions.AT_END).cells.texts.everyItem().fontStyle = "regular";
       }
      

       

      Can you use the location options for this?