My husband replaced the front master power window switch because there were all kinds of things going wrong and that was the diagnosis we got. Now everything seems to work okay, but the error and bells telling us the doors are not latched won't stop going off constantly!
It does not appear you have to program that type of switch but you may have other issues. You might have a broken wire in the door boot. Conduit from door to body. Does it happen with door open. CLose latch with a screwdriver and open the door all the way to see if the errors stop.