If any person holding any office in this state dies or his office in any way becomes vacant and any books, papers or property belonging or appertaining to such office come into the possession of any person, the qualified successor to such office may, in the manner before prescribed in Sections 36-12-20 through 36-12-25, demand such books, papers or property from the person having the same in his possession; and, on the same being withheld, an order may be obtained and the person charged may, in like manner, make oath of the delivery of all such books, papers and property that ever came into his possession; and, in case of his failure to make such oath and to deliver up the books, papers or property so demanded, such person shall be committed to jail and a search warrant may be issued and the books, papers, or property seized by virtue thereof and delivered to the plaintiff, as prescribed in Sections 36-12-20 through 36-12-25.