3 Replies Latest reply on Dec 25, 2015 4:02 AM by Johnwhite

    How to define cells stroke?

    Johnwhite Level 1

      Hi experts

       

      I want to change cell strokes type to null in all open docs.

       

      could someone please to tell me how to define  Docs[i].everyItem().stories.everyItem().tables.everyItem().cells.everyItem();?

       

      my script like:

       

      var Docs = app.documents;

          for (var i = Docs.length-1; i >= 0; i--) {

              var s = Docs[i].everyItem().stories.everyItem().tables.everyItem().cells.everyItem();

                          s.topEdgeStrokeType = null;

                          s.bottomEdgeStrokeType = null;

                          s.rightEdgeStrokeType = null;

                          s.leftEdgeStrokeType = null;

                      }

       

      what's wrong with it?

       

      Regard

      John

        • 1. Re: How to define cells stroke?
          Johnwhite Level 1

          Thank you pkahrel

           

          I change it like this:

           

          var Docs = app.documents;

              for (var i = Docs.length-1; i >= 0; i--) {

                  var s = Docs[i].everyItem().stories.everyItem().tables.everyItem().cells.everyItem(); 

                      for (var j = s.length-1; j >= 0; j--) { 

                              s[j].topEdgeStrokeType = null;

                              s[j].bottomEdgeStrokeType = null;

                              s[j].rightEdgeStrokeType = null;

                              s[j].leftEdgeStrokeType = null;

                          }

                  }

           

          but error.

           

          any wrong?

           

          Regard

          John

          • 2. Re: How to define cells stroke?
            Peter Kahrel Adobe Community Professional & MVP

            I deleted my earlier post because it was wrong. The error in your code is Docs[i].everyItem() -- you can't do that. Instead, do this:

             

            s = app.documents.everyItem().stories.everyItem().tables.everyItem().cells.everyItem();
            s.topEdgeStrokeType = null;
            s.bottomEdgeStrokeType = null;
            s.rightEdgeStrokeType = null;
            s.leftEdgeStrokeType = null;
            

             

            P.

            • 3. Re: How to define cells stroke?
              Johnwhite Level 1

              Thank you pkahrel.

              Regard

              John