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

running any Java Script to add a row to a table created in InDesign.

Explorer ,
Dec 18, 2023 Dec 18, 2023

Hi,

I converted all the forms from Word to PDF and customized them based on the requirement to have a digital signature (Using Acrobat Pro DC).

 

Some of these tables need to add/delete rows button. The IT department suggested the Indesign and provided me with the subscription. 

 

Unfortunately, I can not find a solution for running any Java Script to add a row to a table created in InDesign. (No name for the table that I can consider as an object).

 

please help me with the JS code, how can I run it in Indesign without knowing the table name?

 

Where I can run JS in Adobe Indesin tool?

 

Thanks in advance,

TOPICS
Scripting
164
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

correct answers 1 Correct answer

Community Expert , Dec 18, 2023 Dec 18, 2023

The following line of code would add a row to every table in the currently active document

app.documents[0].stories.everyItem().tables.everyItem().rows.add()

For instructions on how to run script in InDesign, check out the following article

https://creativepro.com/how-to-install-a-script-in-indesign-that-you-found-in-a-forum-or-blog-post/

-Manan

Translate
Community Expert ,
Dec 18, 2023 Dec 18, 2023
LATEST

The following line of code would add a row to every table in the currently active document

app.documents[0].stories.everyItem().tables.everyItem().rows.add()

For instructions on how to run script in InDesign, check out the following article

https://creativepro.com/how-to-install-a-script-in-indesign-that-you-found-in-a-forum-or-blog-post/

-Manan

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