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

change cell inset

Community Beginner ,
Nov 26, 2018 Nov 26, 2018

Copy link to clipboard

Copied

Hi, I have tables with different values ​​of bottoms cell inset. I would like to change the value of those who have 2mm for 3mm. I tried a few things but they change all the bottom cell insets. Thanks!

TOPICS
Scripting

Views

1.1K

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

Guide , Nov 27, 2018 Nov 27, 2018

// by FRIdNGE, november 2018

var myCells = app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().getElements();

for (var c = 0; c < myCells.length; c++) if ( myCells.bottomInset == 2 ) myCells.bottomInset = 3;

Best,

Michel

Votes

Translate

Translate
Contributor ,
Nov 27, 2018 Nov 27, 2018

Copy link to clipboard

Copied

Hi Marie,

    try this,

var myDoc = app.documents[0];

var table = myDoc.pages[0].textFrames[0].tables[0].cells;

for(var i = 0; i < table.length; i++){

    if(table.bottomInset == "2"){

        table.bottomInset = "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
Community Beginner ,
Nov 27, 2018 Nov 27, 2018

Copy link to clipboard

Copied

Awesome! Thank you so much

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
Contributor ,
Nov 27, 2018 Nov 27, 2018

Copy link to clipboard

Copied

Your welcome dear 

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
Guide ,
Nov 27, 2018 Nov 27, 2018

Copy link to clipboard

Copied

Sure? …

Best,

Michel, for FRIdNGE

[Sorry to disagree once again!]

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 Beginner ,
Nov 27, 2018 Nov 27, 2018

Copy link to clipboard

Copied

well, I tried on a document with only one table, but when I'm in a larger file with a lot of tables it make a error.Screen Shot 2018-11-27 at 9.42.43 AM.png

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
Guide ,
Nov 27, 2018 Nov 27, 2018

Copy link to clipboard

Copied

// by FRIdNGE, november 2018

var myCells = app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().getElements();

for (var c = 0; c < myCells.length; c++) if ( myCells.bottomInset == 2 ) myCells.bottomInset = 3;

Best,

Michel

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 Beginner ,
Nov 28, 2018 Nov 28, 2018

Copy link to clipboard

Copied

LATEST

Thank you!

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