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

Re: Need to apply table fill color based on text content

$
0
0

Hi Franke,

 

Try the below code, may it will helpful:

 

 

var myDoc = app.activeDocument

 

//var myCell = app.activeDocument.textFrames.everyItem().tables.everyItem().cells.ev eryItem().getElements()

 

app.findTextPreferences = app.changeTextPreferences = null

 

app.findTextPreferences.findWhat = "Apple"

 

var myFound = myDoc.findText()

 

for(i=0; i<myFound.length; i++)

{

    if(myFound[i].parent.constructor.name == "Cell")

    {

    myFound[i].parent.fillColor = "aaa"

    }

}

 

 

If the above code helps you, then please give Helpful or Correct Answers.

 

Because for the last 3 months only I started my Indesign Scripting Career.

 

With the help of Forum legends I can able to reply for simple questions.

 

Thanks all...

 

 

Regards

BEGINNER


Viewing all articles
Browse latest Browse all 37788

Trending Articles



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