Colin Anthony Talbot and co-defendant Lee Wilson were convicted of occupying for unlawful purposes a university room following a trial at Oxford magistrates court on February 1 last year.
They were each ordered to complete 80 hours community service and pay£50 towards prosecution costs on February 22 last year.
On Thursday 15 October 1998, the two men were arrested after being found inside the Wolfson Building, part of Oxford University's department of engineering science, the court heard.
Mr Hilsdon, when he arrived at his office in the morning, found Mr Wilson leaning against the doorway reading a newspaper and Mr Talbot inside the room.
When challenged, the men said they were distributing leaflets for a cleaning company, but they had only one in their possession.
Dissatisfied with their explanation, Mr Hilsdon notified the university's security staff, who called the police.
The Vagrancy Act 1824 states that 'every person being found in, or upon, any dwelling house, warehouse, coach-house, stable or outhouse, or in any enclosed yard, garden or area for any unlawful purpose' shall be guilty of an offence.
The two men were charged with being found in 'an enclosed area', the high court was told.
Mr Talbot's counsel, Nigel Daley, argued the magistrates should have dismissed the case because the university office was not an 'enclosed area' within the meaning of the Act.
In 1824, the word 'area' did not have the wide, generic meaning it had today, and should be given a narrow interpretation, he said.
Mr Justice Gage, sitting with Lord Justice Roch, accepted Mr Daley's submissions, saying the word should be read in the context of those preceeding it. 'It seems to me that they connote an area that is in the open.'
Rejecting crown submissions that the Act extended to non-domestic premises, Mr Justice Gage said: 'If that had been intended, those would have been the words included by parliament.'
'I consider that within the context of section 4 of the Act an enclosed area does not include a room within a building and does not include the room in this particular case.
'As Mr Daley submitted, it would have been quite simple for the prosecution to charge these men with burglary. They did not. In my judgement the offence charged was not made out on the facts as found by the magistrates.'
Mr Wilson was not involved in the appeal, but the court's ruling means he too is entitled to have his conviction overturned.