Skip to main content
Participant
June 6, 2023
Question

Cell sizes, document with many tables

  • June 6, 2023
  • 1 reply
  • 177 views

Hi! I have a document with many different text boxes that I am converting into tables. I would like to at least be able to have a default cell size when I convert every text box into tables, but now I also have to adjust the size of every tables' cells separately, which is an agonizing process. Is there any way to work around this? Cell styles haven't helped me as they only define the colours/graphics of the cells, not the size.

 

Also, is there a way to select ALL text in my document and convert everything to separate tables? That would make my day. 

This topic has been closed for replies.

1 reply

brian_p_dts
Community Expert
Community Expert
June 6, 2023

Not knowing how your text/doc are set up, this is the beginning of a way to approach your problems: 

app.activeDocument.stories.everyItem().texts.everyItem().convertToTable("\t","\r");
app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().width = "20 pt";

 

Tove5FC6Author
Participant
June 6, 2023

Hi, thanks a lot for your help! I'm quite a noob when it comes to coding, so is there a way to also force every table to use a certain table style that I have in the document? And how do I add to the second script so that it also defines the height of the cells?