2 Replies Latest reply on Oct 14, 2010 5:05 AM by Marijan Tompa [tomaxxi]

    Change only the first found text...

    Marcos Suárez Level 1

      I need change only the first ocurrence, but with this...

       

      app.findChangeGrepOptions.includeMasterPages = false;
      app.findChangeGrepOptions.includeFootnotes = false;
      app.findGrepPreferences = app.changeGrepPreferences = null;
      app.findGrepPreferences.appliedParagraphStyle = "_TIT";
      app.findGrepPreferences.findWhat = ".+$";
      app.changeGrepPreferences.changeTo = "$0\\r~c" ;
      app.activeDocument.changeGrep();

       

      I change all ocurrences...

      ¿How can I do this...?

       

      Thanks...