5 Replies Latest reply on Apr 20, 2013 5:23 AM by rajnikids

    Help on finding text and applying INDEX

    rajnikids Level 1

      Hi Forum,,

       

      I m trying to apply INDEX to the founded words at a single click of the "UI button created".

       

      Is that possible.

       

      This is my try.

       

      app.findGrepPreferences = app.changeGrepPreferences = null;

      doc = app.activeDocument.stories.everyItem();

      app.findGrepPreferences.findWhat = "Policy";

                                    found = app.documents[0].findGrep();

                  for (i =0 ; i>found.length; i++) {

                      //fnd = found[i];

                                    if (found.length > 0)

                  doc.indexes[0].topics.add(found);

                  app.select[found];

      doc.pageReferences.add(found[i], PageReferenceType.currentPage );

      }

       

       

      thanks & regards,

      rkids