Whenever a vacancy shall exist in the office of clerk of any court, sheriff, or coroner and the vacancy shall not have been filled on or before the commencement of the term of any court which the clerk, sheriff, or coroner is required to attend, or if the clerk, sheriff, or coroner shall be absent, deceased, become unable, or refuse to discharge his duties, or be on trial therein, the court, or the judge or judges thereof, shall have power to appoint a suitable person to discharge the duties of clerk, sheriff, or coroner pro tempore, who shall take the oath required by law, and perform the duties and receive the emoluments of the office to which he is appointed, until the proper incumbent shall be duly qualified or return to his duties.