2 Replies Latest reply on Jun 14, 2010 8:49 AM by dennismacaburas

    JS/CS3 Move content to previous table cell

    dennismacaburas

      I try to create a script that should find and cut a certain content of the cell and paste it to previous cell. For example $12,333.  The $ sign should be in the previous cell while the number should retain to its location. I am new in scripting and my script don't work that way. Please help.

       

      var myDoc =  app.activeDocument;

      app.findTextPreferences = app.changeTextPreferences = null;
      app.findTextPreferences.findWhat = '$';
      var myFound = myDoc.findText();

      for (i = myFound.length-1; i >= 0; i--)
      {
      myFound[i].insertionPoints[0].select();
      myFound[i].insertionPoints[0].contents = "$";
      }