Remove the two screws holding the magnet to the old door.
Close the new door and locate the switch mounted to the frame along the edge of the door.
Place the magnet on the inside face of the door, next to the switch on the door frame.
Attach the magnet to the door with the two screws that held it to the old door.
Ensure that the gap between the magnet and the switch is less than 3/4 inch when the door is closed.
Pry the magnet out of the edge of the old door with a flat screwdriver.
Open the new door and locate the switch mounted inside of the door jamb. Mark the inside of the frame where the switch is located.
Close the new door. Transfer the mark on the door frame to the face of the new door. Open the door.
Mark the center of the edge of the door at the same place as the mark on the face of the door. Drill a hole, slightly larger than the base of the magnet, where the mark on the edge of the door is. Slide the magnet into the hole and gently tap it until it is flush with the door edge.
Close the door. Ensure the gap between the magnet and the switch is less than 3/4 inch when the door is closed.