Answer
Henry IV was excommunicated by the Pope in 1076. This happened after Henry refused to attend a church council called by the Pope to discuss the issue of investiture. Investiture was the practice of bishops being appointed by the king, rather than by the Pope. The Pope saw this as a way for the king to control the church, and he wanted to put a stop to it.