I'm going through the same episode with my maltese. I learned that when she's not in frenzy and start barking I say QUIET and then rattle her treat bag (that get's her attention). When she quiets down I give her a treat. It's been a few weeks and I see her catching on, when she barks I don't always say quiet she on her own stops and looks at me like "when are you going to say quiet for my treat".
It doesn't always work but it's getting there.
Good Luck!! and if you finally find the trick please let me know