I have a pug mix that i adopted when he was 1 year old. He's pretty hyper and very curious, so for the first few months i had him he would bolt out of any slightly open door. His behavior has improved a lot since i first got him, though he still has his moments. The last time he bolted i had left his leash on the front porch, and when he ran out i grabbed it. He ran right over to me, sat down, and waited for me to put it on. The leash is the first step in going to the dog park in his mind, and allowed me to take him back to the house without breaking my back holding on to his collar or carrying him.
my grandmother had a german shepherd who, would bolt out the door all the time to chase the neighborhood cats. one time, when i visted my grandparents, i brought my cat with me too. poor queen (the dog's name) did not know what to make of tiger baby (the cat's name) living with her! the two of them grew to love each other. queen also stop chasing cats all together.
This is very good advice since I had the same problem with each of my Border Collies who tend to be a little more hyperactive than most breeds. In addition to keeping a leash handy, I would also make them sit and calm down before I opened the door and make certain that I am first out the door too.
Ours does that too. She thinks that anytime us humans go outside, its because we're going for a car ride, so she usually just bolts straight to one of our cars running laps around it waiting to let her in. So to get ahold of her we usually just have to be like "Wanna go for a car ride?" and open on of the doors to grab her as she's jumping in. I feel so bad for tricking her like that though. I guess one time, she saw this lady (we live in an apartment community) and wanted to play with this woman so bad that she ended up following her into her apartment, all the while, this woman was freaking out thinking our innocent little puppy was going to eat her...
I chuck handfuls of treats at my dog until they destract him enough that I can grab him. I know this is a bad solution, but luckily, bolting is really his only fault. He's a great dog other than that.