Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Help on finding text and applying INDEX

$
0
0

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


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>