1 person found this helpful
work with logical OR and not with logical AND.
You also could do it in a positive way.
Some code to illustrate this:
I marked the answer as the correct answer because it's a much more elegant solution (using the OR instead of AND operator ), but one strange thing that happened is that when I updated to InDesign 2017, the code was working again.
Hm, what was your exact InDesign version before you updated to CC 2017?
It was CC 2015, and it was working for a bit, but there are periodic updates that happened before the major CC 2017 update that may have tripped the code up.