Reply To: Define table row heights, column widths in styles somehow?

Home Page / Forums / General InDesign Topics (CLOSED) / Define table row heights, column widths in styles somehow? / Reply To: Define table row heights, column widths in styles somehow?

#55918

Hi Steve, and welcome to the wonderful world of scripting!

If you want to change “rows 2 to x“, normally you would have to 'manually' loop over these rows, and to do that, you'd have to manually loop over all tables, and to do that, well, you'd have to manually loop over all stories … Using the fast everyItem() function avoids all this work, but — it can only work on every item, not something like 'from row 2 to the end' (hence the name :-D ).

So you have no choice, other than using the much slower loops? Sure you have! You can set all rows of all tables to your 'remaining' height value, and then change only the 1st and 2nd rows' height.

Add this line before your first one, and you should be done:

app.activeDocument.stories.everyItem().tables.everyItem().rows.everyItem().height = “20mm”;

(replacing the 20 mm with the height you need).

This article was last modified on June 4, 2010

Comments (0)

Loading comments...