I found a solution for my 96 Ford Ranger XLT whose Door Ajar Alarm wouldn't stop ... well sometimes ... then eventually, all the time(s).
After days (weeks) of listening to that thing ... trying all kinds of cleaning the door at all the wrong places, I got the diagrams from Parts at a local Ford Dealership, and found where the switch was actually located in my Ranger.
>>>>> I simply removed the 3 screws holding the latch mechanism in place, moved the mechanism to one side, and squirted a small amount of Liquid Wrench into the top of the Door Alarm Switch.
>>>>> After replacing the 3 screws, I also squirted the latch in the center and to the sides, so it drained down into the switch, and out through the vents in the door.
>>>>> O'Reilly's suggested lubricating same with White Lithium Grease (if I remember correctly ... which I have not done yet ...)
Problem solved (but ... why do I still hear the dinging? (echoing in my head?
See the diagrams and other photos: they tell the whole story ... ... ...