Section 7. In all proceedings in the probate court or elsewhere, connected with any authority exercised by the trust department, all accounts, returns and other papers may be signed and sworn to, in behalf of such bank by any officer thereof duly authorized by it, who has knowledge of the subject matter covered therein, and the answers and examinations under oath of said officer shall be received as the answers and examinations of such bank. The court may order and compel an officer of such bank to answer and attend said examination in the same manner as if he, instead of the bank, were a party to the proceeding.