“At” or “in” the office?

‘At the office’ refers generally to the state of someone who works in an office of some kind being at work, e.g.

“Where’s Bob?”, said Jim.
“At the office.”, replied John

It can also refer to an object being at said place of work:

“Where’s your briefcase?”, said Jim.
“I left it at the office.”, said John.

‘In the office’ refers to someone or something physically being in a specific office, e.g.

“Where’s Bob?”, said Jim. “In his office.”, said John.

This would usually be used when the office in question was in close proximity to the speakers, for example if Jim and John were in another office in the same building as Bob.

“Where’s the telephone?”, said Jim. “It’s in the office”, said John.

However, in and at are often interchangeable. Take the briefcase example. John could have said:

“I left it in my office.”

To summarise, ‘at’ is a more general, vague term, whereas ‘in’ usually refers to a specific location.