12 Replies Latest reply on Jan 19, 2015 3:41 AM by Teetan VK

    Correct my script please!

    Teetan VK Level 1

      Hi everyone

       

      Could someone please help me to correct my script:

       

      var docs = app.documents;

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

              {

                  var
      myTarget = app.target[0]; 

      if(myTarget instanceof InsertionPoint)

      {myTarget.insertionPoints[0].underline=false;

                                                  }

      else if(myTarget instanceof Cell)

                                      {for(i=0; i<myTarget.cells.length; i++)

      {myTarget.cells[i].texts[0].select();

                                              app.selection[0].underline=false;

                                                  }

                                              }

      else if(myTarget instanceof Table)

                                      {for(i=0; i<myTarget.cells.length; i++)

      {myTarget.cells[i].texts[0].select();

      app.selection[0].underline=false;

                                                  }

                    }

      else{myTarget.underline=false;

                                      }

                                  }

       

      Aim to clear the underline which in the inserpoint, cells,
      tables, text.

       

       

      Thanks

       

      Regard

       

      Teetan