Skip to main content
hamdifem
Inspiring
September 20, 2014
Question

how to table in text center

  • September 20, 2014
  • 1 reply
  • 255 views

myTable.cells.everyItem().paragraphs.Justification = Justification.CENTER_ALIGN;

or

myTable.cells.everyItem().texts[0].Justification = Justification.CENTER_ALIGN;

I can not run

This topic has been closed for replies.

1 reply

Community Expert
September 20, 2014

ExtendScript is case-sensitive:

j is not J

Look here online in the DOM (Document Object Model) documentation:

Adobe InDesign CS6 (8.0) Object Model JS: Text

So this will work:

myTable.cells.everyItem().texts[0].justification = Justification.CENTER_ALIGN;

Best download the CHM file version of the documentation (for best searchability offline) from here:

Indesign JavaScript Help

Jongware did a fabulous job to create them…

Uwe