• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Looking for a solution in tables to change in a whole document the 4 cell insets?

Engaged ,
Jan 06, 2021 Jan 06, 2021

Copy link to clipboard

Copied

I need to change in a document (one per page) with many tables the 4 cell insets to a new measure.

It is possible?

Thanks

 

 

Screen Shot 2021-01-06 at 1.54.47 PM.png

 

TOPICS
How to

Views

298

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Jan 14, 2021 Jan 14, 2021

Palala Fog, Try this

 

if(app.activeDocument.stories.everyItem().tables.length>0)
{
app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().bottomInset = 1.3;
app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().topInset = 1.3;
app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().leftInset = 1.3;
app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().rightInset = 1.3;
}

Votes

Translate

Translate
Community Expert ,
Jan 06, 2021 Jan 06, 2021

Copy link to clipboard

Copied

Assuming you did not use Table and Cell styles, every table uses at least the Basic Table style (unless you set it to No Table Style when creating it). 

image.png

However, table styles do not have a default Cell style assigned. Make a new Cell style (I called my "Cell Insets") and assign it under the Basic Table style.

image.png

Edit your cell style insets and all the tables should update. However, if you previously manually edited the insets, the style setting won't remove the override. 

image.png

David Creamer: Community Expert (ACI and ACE 1995-2023)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 06, 2021 Jan 06, 2021

Copy link to clipboard

Copied

Hi,

 

Your tip is a big one discover. 
It worked perfectly for almost all files!
 (Just for two documents couldn't be applied: if you have the line of code will be splendid)

I am not marking for the moment «correct answer» dreaming other solution is possible, although yours seems fine...

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 06, 2021 Jan 06, 2021

Copy link to clipboard

Copied

You don't need any code. Just create another Cell style that fits your other two documents, select the cells, and click the Cell style.

David Creamer: Community Expert (ACI and ACE 1995-2023)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 07, 2021 Jan 07, 2021

Copy link to clipboard

Copied

Him Creamer:

Thanks. The idea is to modify all the cells with a new measure.

It is a huge file with 300 tables...

Think that the best path is to use a line of scripting.

Also, ID not always applies cell styles via the Table style menu.

 

Thanks.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2021 Jan 07, 2021

Copy link to clipboard

Copied

>The idea is to modify all the cells with a new measure

OK--I don't see the problem. You might need to use some based-on cell styles. If you want to send me a sanitized version of your file, I'd be happy to take a look at it. (I'd need a data file too.)

 

> Also, ID not always applies cell styles via the Table style menu.

ID styles will work fine as long as the table does not have any manual formatting applied. It's important to use only table and cell styles to format the table--manual adjustments could easily break the link. Even if you want to apply a paragraph style, you need to create a cell style linked to that paragraph style.

>

It is a huge file with 300 tables...

The number of tables shouldn't matter as long as you have a good system. Even with a reasonably powerful system, I've had to walk away fro 15-20 minutes while updating a 1000-page book. It's also possible, depending on the document, that it could be broken up into separate sections and using an ID book file. 

 

 

David Creamer: Community Expert (ACI and ACE 1995-2023)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2021 Jan 08, 2021

Copy link to clipboard

Copied

Clarification: Table styles can apply cell styles automatically to the header/footer, first column, middle columns, and last column. It cannot apply cell styles automatically to rows. 

For that, one would indeed need to do it manually--or use a script or plugin. 

Some script references:

https://community.adobe.com/t5/indesign/how-to-apply-a-table-cell-style-based-on-grep-search/td-p/51...

https://community.adobe.com/t5/indesign/script-to-find-amp-replace-cell-style-of-a-specific-cell/td-...

Some plugin options:

https://www.woodwing.com/en/smart-styles-adobe-indesign-plugin

https://www.65bit.com/software/easycatalog/ (They make a "lite" version, but I would have to check to see if it has the options you need.)

 

David Creamer: Community Expert (ACI and ACE 1995-2023)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 14, 2021 Jan 14, 2021

Copy link to clipboard

Copied

Palala Fog, Try this

 

if(app.activeDocument.stories.everyItem().tables.length>0)
{
app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().bottomInset = 1.3;
app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().topInset = 1.3;
app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().leftInset = 1.3;
app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().rightInset = 1.3;
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 15, 2021 Jan 15, 2021

Copy link to clipboard

Copied

LATEST

Thanks, Yes, it worked.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines