InDesign Script Error 30477
Hello Everyone,
I'm a beginner JS developer.
I need create a function to use at different times. When I indicate a paragraphStyle as a parameter, there is the following error:
Example:
function basicFunction(style){
app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING
app.findGrepPreferences.appliedParagraphStyle = style
...
}
var author = app.activeDocument.paragraphStyleGroups.itemByName("authors").paragraphStyles.itemByName("first author")
basicFunction(author);
The error:
"Error Number: 30477
Error String: Invalid value for set property 'AppliedParagraphyStyle'. Expected String, ParagraphStyle or NothingEnum enumerator, but received nothing".
I didn't find anything on the forums about styles as parameters.
Thanks a lot for the help!
