Here is the lamp before I did anything to it.
Prepping is the most important part! Give the lamp a really good cleaning. Be sure to scrape off any blemishes; for example this lamp had drops of paint on it that needed to be removed.
Tape up the parts that you don't want to get paint on. I find it's easy to put the cord in a zip lock bag so I only have to tape the little part that sticks out.
Now spray paint it!
Here is the lovely finished product!