Keep your office number on speed dial on your cell phone. If someone walks in and won't leave, call your office from your cell phone in a very smooth, inconspicuous manner. Most of my co-workers leave if they hear my phone ring, so I've done this a couple times and it has worked like a charm. I did this a couple weeks ago and my co-worker wouldn't leave, so I ended up having a fake conversation on the phone for three or four minutes just so I wouldn't look like an idiot.
Flipping classic. They NEED to put this scenario on The Office. Like Michael won't leave someone alone and one of the workers, maybe the temp, tries out this tactic only to have it backfire big time.