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

Selecting the tables

Guest
Jul 29, 2010 Jul 29, 2010

Hi All

Can anyone tell me the syntax for selecting the table one by one in a whole Indesign document.

Sajeev

TOPICS
Scripting
704
Translate
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
Explorer ,
Jul 29, 2010 Jul 29, 2010

There doesn't appear to be any 'tables' collection that's document wide, but you can iterate through all tables in a document like this:

for (var f = 0; f < app.activeDocument.textFrames.length; f++){
     for (var t = 0; t < app.activeDocument.textFrames.tables.length; t++){
          var tempTable = app.activeDocument.textFrames.tables;
     }
}

Translate
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 ,
Jul 29, 2010 Jul 29, 2010

@brettpolo:

Marc Autret showed a wonderful method to change table properties document wide in his blog post "On "everyItem" - Part 2" in the section "Using everyItem().properties":

http://www.indiscripts.com/post/2010/07/on-everyitem-part-2


Don't miss part 1! A must-read for all ExtendScript-scripters…

Uwe

Translate
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
Guest
Jul 29, 2010 Jul 29, 2010
LATEST

Thanks Uwe

I saw the page it really helps me

Sajeev

Translate
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 ,
Jul 29, 2010 Jul 29, 2010

This script will select all tables in the active document, one by one. That's not very useful -- or is it?

for (s=0; s<app.activeDocument.stories.length; s++)
{
for (t=0; t<app.activeDocument.stories.tables.length; t++)
{
  app.activeDocument.stories.tables.select();
}
}
Translate
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
Guest
Jul 29, 2010 Jul 29, 2010

Thanks Jongware

It really works great . I have completed the task.

Sajeev

Translate
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