Go to Options->Wallet->Enable Coin Control.

Click the INPUTS button.  This will show you all the addresses that you currently have in your wallet that have balances.

Copy those addresses to a text editor or somewhere you can easily access them.

Go to Help->Debug Window->Console

Then type: dumpprivkey XXXXXXXXXX   (where XXXXXXXX is the address you want to retrieve the private key for)

This will give you the private key for each address entered.

When you are ready to import your private keys into a new wallet, go to Console and type :importprivkey XXXXXXXXXXXXXX for each private key you wish to import.