I've just been working a couple weeks with my two oldest on this.
I have them on their leads and before I open the door, I make them sit and tell them to wait. After they are sitting nicely, I open the door - at first they try to run out but I make them sit again and wait again.
Now they are getting so good at it! Sometimes I just have to clear my throat and look at them and they will sit and wait.
I actually started doing this for the pack leader role thingy. The human should always go in and out the door first.
It takes a little work but Yorkies are so smart, they catch on fast.