Preparation is key to a great finished job, and this is just as true of woodwork as it is of walls. Door frames can prove tricky to paint as there are lots of angles and crevices, but ensuring that it is properly prepared first will make the job so much easier...
Firstly, you should remove all door furniture. Door 'furniture' is the term that covers all the metal and extra parts such as handles, catches and hinges. Most people don't remove the door entirely prior to painting the frame, so be sure to cover the hinges with masking tape to prevent paint getting on to them.
Once all the bits and pieces have been removed, dust the door frame thoroughly. You'll be surprised where dust and debris builds up, and just how much. You can use a Hamilton dusting brush, or if you don't have one to hand, a dry paint brush to get into corners or into the latch space, and be sure to dust well on top of the frame where dust is prone to gather and build up. Dusting the frame before you begin painting ensures that you won't have to spend time picking specks from the paint while you're completing the job.
You can then wash the door frame down with sugar soap or a mild water and detergent solution to get rid of any greasy build-up. This is particularly important if people in the house smoke as it causes a sticky, brown residue that is often not really noticeable until you start to wash the door. You'll be shocked by the difference, and of course it means that your paint will go on more smoothly and evenly. This step is well worth considering if smokers are present as paint doesn't adhere well to greasy surfaces, and you could end up with a streaky, uneven finish.
If it is some time since the door has been painted, or if there are already several coats of paint on the wood, you might want to strip or sand the frame. Where there are just a couple of previous coats of paint, but where paint is flaking or patchy, sanding is fine. If the door frame has more that three coats of old paint it can be useful to use a good quality paint stripper first. Be sure to read the instructions carefully and protect eyes and skin while applying and removing the product. Once stripped, sand the frame lightly and remove dust and debris before painting.