Pope Gregory VII excommunicated Henry IV after he refused to stop

starting nondefensive wars
taxing churches
working on Sundays
installing his own bishops