Actually, according to Church Canon 751, anyone who rejects one or more Catholic Church teachings is considered to be a “heretic” … … Heresy is the obstinate denial or obstinate doubt after the reception of baptism of some truth which is to be believed by divine and Catholic faith …And according to Canon 1364 §1, heretics are AUTOMATICLY excommunicated from the Catholic Church … … an apostate from the faith, a heretic, or a schismatic incurs a latae sententiae excommunication … The phrase “latae sententiae” means a judgment or sentence which has already been brought, in other words, a sentence or judgment which does not need a future additional judgment from someone in authority; it refers to a type of excommunication which is automatic. Such a sentence of excommunication is incurred “by the very commission of the offense,” (CCC 2272) and does NOT require the future particular judgment of a case by competent authority.
Hope this helps.