Student or Learner
My grammar book says "if some past event is too close to the present, present perfect is used", but I doubt it.
Even if someone left the office 2 hours ago, you can still say "Mr.Miller has left the office" in relation to the present and even if someone left the office 5 seconds ago, if you want to say in relation to the past, you can say "Mr.Miller left the office 5 seconds ago". What do you think?
gz37)Mr. Miller has just left the office. I think you can catch up with him if you hurry.
Not a teacher
You can use both tenses even if you refer to immediate past, it just depends on how you structure your sentence (if you use 'ago', then you'd clearly go for Past Simple) or who speaks the language.
1. He has just left the office.
2. He left the office 5 seconds ago.
3. He just left the office.
I believe the last one would be more common in AmE than BrE, which is not to say AmE speaker wouldn't use Present Perfect.
However, when there are no other indicators (like, ago or just) or broader context, Present Perfect gives you this extra piece of information that Past Simple doesn't,
He's left the office. He's not back yet.
He left the office. You don't know whether he came back or not.
"He's just left" would be the most natural in BrE if he had left the office in the last couple of minutes.
Remember - if you don't use correct capitalisation, punctuation and spacing, anything you write will be incorrect.