1 person found this helpful
One or another variation of this gets asked from time to time. It is not something that ID can do out of the box, but it may be scritpable. You should ask in InDesign Scripting
Why do I always forget that??????
I've got a (commercial) script that does just that.
Go to the scripts tab and you should see a script called "Apply Masters
Based on Paragraph Styles".