In case of a vacancy in the office of the secretary of the senate, or clerk of the house, or of the absence or inability of either to perform the duties imposed by this act, such duties shall devolve upon the assistant secretary of the senate or journal clerk of the house of the next preceding senate or house of representatives. In case of a vacancy during the session of the legislature, such vacancy shall be filled by election of the body where such vacancy occurs. In case of a vacancy, during such time as the legislature is not in session, and before assuming the duties of secretary of the senate or clerk of the house, the assistant secretary or journal clerk, as the case may be, shall take and subscribe to the constitutional oath of office, and shall thereafter be vested with all the powers and duties as secretary of the senate or clerk of the house for the unexpired term, and shall be entitled to the compensation provided by law for said assistant secretary or journal clerk respectively.