(a) This section does not apply to:
(1) a lawyer while employed as a part–time magistrate for juvenile cases; or
(2) an individual while:
(i) performing an affirmative duty required by law; or
(ii) engaging in an activity related to a case in which the individual is a party or has a property interest.
(b) Even if an individual has been admitted to the Bar, the individual may not practice law while employed:
(1) except as provided in subsection (c) of this section, as a sheriff or deputy sheriff;
(2) in a jail or penitentiary, as:
(i) a warden or deputy warden; or
(ii) a superintendent or deputy superintendent;
(3) as a bailiff;
(4) as a clerk or deputy clerk of any court or an employee of a clerk;
(5) as a register or deputy register of wills or an employee of a register of wills; or
(6) as an officer or employee in a juvenile court.
(c) An individual employed as a sheriff or deputy sheriff in Washington County who has been admitted to the Bar may practice law in a county other than Washington County.
(d) (1) This subsection does not apply to the settlement of small estates as set forth in Title 5, Subtitle 6 of the Estates and Trusts Article.
(2) In Prince George’s County, a sheriff, deputy sheriff, warden, deputy warden, clerk, or employee of any court may not prepare or help in the preparation of any form or document that is filed in a court in that county or that affects a case that is or may be filed in a court in that county.