Skip to main content
Known Participant
May 13, 2014
Answered

I need to force column widths to values smaller than the indesign preset minimuns (1,058mm).

  • May 13, 2014
  • 1 reply
  • 2243 views

Jongware provided two ideas for forcing a table's rows and columns into heights and widths smaller than the Indesign preset 1.058mm.

For rows: app.selection[0].properties = {autoGrow:false, height:"0.5mm"};

And for columns he sugested: app.selection[0].width = "0.5mm";

The problem is that while the code for rows works perfectly, the one for columns returns an error "Expected Unit, but received 0.5mm" I'm running Indesign cs6. Anyone has any insights to help fixing such script, or maybe some different approach? Thanks!



This topic has been closed for replies.
Correct answer Laubender

Althought that really solved it, I can't declare it a feasible solution because the amount of time I would spend doing that would render the work impossible to complete. Kudos to your workaround, Uwe.

Would you say there is no script to solve it than? I just might have to give up on the project


Hm, other than using InDesign CS5.5 or below with scripting?
Or export IDMS, open and edit (by script of course, it's just a plain text file in disguise), place IDMS and replace table?

(IDML as an alternative)

No.

Uwe

1 reply

Jump_Over
Legend
May 13, 2014

Hi,

What is actually selected while executing a 2nd idea?

Did you try it with a table's column selected?

Jarek

Known Participant
May 13, 2014

Yes. I have tried with a single cell selected, a whole column, a whole row, the whole table. Always the same error.

Community Expert
May 13, 2014

If the cell's insets are all set to 0, I have no problem with Jongware's code.

But this was InDesign CS5.5.


With CS6 v8.0.2 there will be an error!

app.selection[0].cells.everyItem().width = "0.5 mm"; //ERROR in CS6, will work in CS5.5

Or will fail silently for the setting a value for width , if more than one property, the width, is applied over:

app.selection[0].cells.everyItem().properties = {autoGrow:false, width:"0.5 mm", height:"0.5 mm"};

InDesign CS5.5 screenshot:

I think we have a bug here…

Uwe