Adding Undo Feature to the  DOC/PDF