Close all doors to the room except for the exit. Turn off all lights. Give the bird time to calm down. Then take a sheet and use it to restrict the area available to the animal until it goes out. The reason for turning out the lights is to make the outside the brightest spot so he can see to retreat. I have used this method with success.
Sorry didn't read the last post from Judy. Glad it all worked.