Find/Change cell style with GREP
Hi All, (my first post here)
I found a handy script on this forum to find/change cell styles in a table. I adapted the script using Peter Kahrel's ebook for use with a GREP query.
I've linked a spreadsheet in InDesign CC 2014 that I want to highlight the cell of new products that contain the value
When I run the script below I am getting random results.
var myDoc = app.activeDocument
app.findGrepPreferences = app.changeGrepPreferences = null
app.findGrepPreferences.findWhat = "\[\u\]"
var myFound = myDoc.findGrep()
for(i=0; i<myFound.length; i++)
{
if(myFound.parent.constructor.name == "Cell")
{
myFound.parent.appliedCellStyle = "New_Product_Cell"
}
}