Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Find table text and change row height

Return to Member Forum

  • Author
    Posts
    • #55551
      Which_mike
      Member

      Hi

      OK, so I have 100-page section in a magazine, all data tables. I want to search the table for 'Specified text' and, where found, change the height of that row to 8.25mm.

      And I'm stuck…

      Can anyone help?

    • #55552
      Anonymous
      Inactive

      That can't be done by “conventional indesign trickery” unfortunately. But in my mind it sounds like it could be scripted. Although that's as much insight as I can offer on that.

    • #55553
      Which_mike
      Member

      Yeah, there's an 'autogrow' script function somewhere that sounds tantalisingly like what i'm after, but buggered if I can set it up…

    • #55559

      “autoGrow” is part of the answer — it corresponds to “Exactly xx mm” in the interface. The other part is, well, actually changing the row height. Fortunately, ID allows all kinds of shortcuts. If you find your specified text and its 'parent' (i.o.w., the containing element) is a cell, you can immediately set the new row height into that. ID is smart enough not to try and apply this on just a single cell.

      Putting it together into a javascript:

      app.findTextPreferences = null;
      app.findTextPreferences.findWhat = “Specified text”;

      results = app.activeDocument.findText();
      for (a=0; a<results.length; a++)
      if (results[a].parent instanceof Cell)
      results[a].parent.properties = {autoGrow:false, height:”8.25mm”};

      (Note: sometimes this editor changes straight quotes to curlies. JS only accepts straight quotes — change where necessary!)

    • #55560
      Which_mike
      Member

      Theunis my friend, I'm not sure if it's love or awe that I'm feeling, but thanks for the help – a lifesaver!

      Mike

Viewing 4 reply threads
  • You must be logged in to reply to this topic.
Forum Ads