This content has been marked as final. Show 5 replies
Two things come to mind:
1. Use the table's storyOffset object to get references to the "character" holding the table and thus the next one and compare their parentTextFrames.
2. Use the parentTextFrames property of the text in the first and last rows of the table.
Thanks Dave! You're a real life saver on this forum.
I think I'm going to use
to find the first and last cells parent text frame, only I'm not using this exact code but looping until the parent is a page then getting the name.
I'm getting there with this stuff, albeit slowly. As an aside: I'm not having to do it with this script, but how in the heck does one simply select a range of cells in table from code?
Many thanks, yet again.
Do you mean select or reference?
myCells = myTable.cells.itemByRange(0,-1)
references all the cells in myTable.
Note that this is the one case where using itemByRange(0,1) produces a difference results from using everyItem().
everyItem() references the cells as individual cells while itemByRange references them as a range of cells. Some of the stroke related properties have different meanings as a result.
Outside of tables, these two constructions produce the same results (I think).
Both and that selection method makes perfect sense. I was wondering more about a portion of a table though.
I know that Cell(1).Name comes back in the format of 2:1, but couldn't figure out how to select cell 2:1 through cell 3:3, for instance. Is there a way to use the Select function with the 2:1 reference format?
startCell = myTable.item("2:1");
endCell = myTable.item(3:3);
myCells = myTable.cells.itemByRange(startCell, endCell);