IIRC, an excomm should disappear when your leader dies. However, if you were at war with the papacy at the time, I suppose that could make a difference. Doesn't the papacy automatically excommunicate anyone who attacks it?