Answered
How to set Underline options in character style through Script
Hi Everyone,
I have tried to set the underline options for character style like type, weight, offset, color etc... through script but i doesn't got any idea and i have refered the scripting guide still now i'm confused....
I have attached the sample code for more details......
Kindly tell me how to set this???????????
app.findGrepPreferences = app.changeGrepPreferences =null;
var searchText = "InDesign";
app.findGrepPreferences.findWhat = searchText ;
var list = app.activeDocument.findGrep ();
try
{
var new_Style = app.documents[0].characterStyles.item("underlie_Text");
new_Style.name;
}
catch (myError){
var new_Style = app.documents[0].characterStyles.add()
new_Style.name = "underlie_Text";
}
new_Style.underline= true;
list.appliedCharacterStyle="col";
Thanks,
-Jo
