The 75-year-old man answered the door of his bungalow, on Queen’s Drive, in Ossett to find two men, one armed with a weapon at around 6.30pm on Monday.
They tried to force their way into the property but the pensioner managed to take hold of the weapon and defend himself before the two suspects ran away across towards Spring Mill Golf Course.
The suspects are both aged 17-18 years, both slim build and about 5ft 10ins tall.
They were both wearing hooded tops which covered their faces.
Det Con Bryn Hampshire, of Wakefield CID, said: “If anyone knows anything about this incident or saw these two suspects in the area at the time of the offence please contact Wakefield CID on 101 or ring Crimestoppers anonymously on 0800 555111.”