Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

app.changeGrepPreferences.appliedParagraphStyle

$
0
0

Why does this work:

 

function changeBoldToCharacterStyleBold(){

    app.findGrepPreferences = NothingEnum.nothing;

    app.changeGrepPreferences = NothingEnum.nothing;

   

    app.findGrepPreferences.fontStyle = 'Bold';

    app.changeGrepPreferences.appliedCharacterStyle = 'bold';

   

    var result = app.changeGrep();

   

}

 

but this doesn't:

 

function putStarsInSummaryInSuParaStars(){

  

    app.findGrepPreferences = NothingEnum.nothing;

    app.changeGrepPreferences = NothingEnum.nothing;

   

    app.findGrepPreferences.findWhat = '^\\*';

    app.changeGrepPreferences.appliedParagraphStyle = 'Su_Para_*';

   

    var result = app.changeGrep();

   

}

 

The ParagraphStyle, like the CharacterStyle that I apply in the other example that works, exists. I get error message 30477 Invalid value for set property 'appliedParagraphStyle'. Expected String, ParagraphStyle or NothingEnum enumerator, but received "Su_Para_*".

 

Please help, thanks!


Viewing all articles
Browse latest Browse all 15932

Trending Articles