Nena used to bark too.
This is what we did.
We did as if we were leaving, closed the door etc.
When she started barking I would go back in and tell her "no".
Then go back out, if she didn't bark for 1 minute I'd praise her.
And everytime we increased the time.
After a while she stopped barking