3 Replies Latest reply on Mar 14, 2012 9:21 AM by Laubender

    exact height on 1st and last table row

    TrapperBob Level 1

      PLease--How do I modify this script so that it will affect the first and the last row.I out of ideas.--- app.activeDocument.stories.everyItem().tables.everyItem().rows.everyItem(0).properties = {autoGrow:false, minimumHeight:"14pt"};

        • 1. Re: exact height on 1st and last table row
          Laubender Adobe Community Professional & MVP

          @Bob – To get access to the first row forget the everyItem(0) in your script. Instead write rows[0], for the last row write rows[-1].

           

          //First row of every table in the document:
          app.activeDocument.stories.everyItem().tables.everyItem().rows[0].properties = {autoGrow:false, minimumHeight:"14pt"};
          
          //Last row of every table in the document:
          app.activeDocument.stories.everyItem().tables.everyItem().rows[-1].properties = {autoGrow:false, minimumHeight:"14pt"};
          

           

          If you have tables with one single row the last row is the first row. The script will not break.

           

          To get the exact height, there are two options:

          minimumHeight
          height

           

          See Jongware's online documentation of  JavaScript:
          http://jongware.mit.edu/idcsjs5.5/pc_Rows.html

           

          Uwe

          • 2. Re: exact height on 1st and last table row
            TrapperBob Level 1

            Sir, thanks to your email, for the rest of the morning here in my office, I’ll be replying with a “GOOD morning” instead of just ‘mourning’.

            Thanks again.

            Robert Bourassa

            Senior Production Artist

            • 3. Re: exact height on 1st and last table row
              Laubender Adobe Community Professional & MVP

              @Robert – I did not email, the forum software did. ;-)

               

              Can I take your statement as "Yes, my question is answered."? Does my code work for you? (I guess so.)

               

              If your answer is "yes", would you mind going to the forum, log in and check my post (1) as "Answered" so that everybody coming to the forum will see at first glance that there is no immediate need to read this thread and act upon an urgent question…

               

              I don't mind about my 10 points, just looking for clarity…

               

              If your answer in "no" and you have some trouble with the code, just let me know as well.

               

              Thank you!

               

              Uwe